mirror of
https://git.youjo.love/youjo/youjo-fe.git
synced 2024-11-20 05:49:54 +01:00
add unit tests
This commit is contained in:
parent
66842efd81
commit
c712754150
1 changed files with 11 additions and 0 deletions
11
test/unit/specs/services/version/version.service.spec.js
Normal file
11
test/unit/specs/services/version/version.service.spec.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { extractCommit } from 'src/services/version/version.service.js'
|
||||
|
||||
describe('extractCommit', () => {
|
||||
it('return short commit hash following "-g" characters', () => {
|
||||
expect(extractCommit('1.0.0-45-g5e7aeebc')).to.eql('5e7aeebc')
|
||||
})
|
||||
|
||||
it('return short commit hash without branch name', () => {
|
||||
expect(extractCommit('1.0.0-45-g5e7aeebc-branch')).to.eql('5e7aeebc')
|
||||
})
|
||||
})
|
Loading…
Reference in a new issue