1
0
Fork 0
forked from srxl/akkoma-fe

add unit tests

This commit is contained in:
taehoon 2019-07-05 13:38:52 -04:00
parent 66842efd81
commit c712754150

View 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')
})
})