version.service.spec.js 390 B

1234567891011
  1. import { extractCommit } from 'src/services/version/version.service.js'
  2. describe('extractCommit', () => {
  3. it('return short commit hash following "-g" characters', () => {
  4. expect(extractCommit('1.0.0-45-g5e7aeebc')).to.eql('5e7aeebc')
  5. })
  6. it('return short commit hash without branch name', () => {
  7. expect(extractCommit('1.0.0-45-g5e7aeebc-branch')).to.eql('5e7aeebc')
  8. })
  9. })