You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pleroma-fe-sjw/test/unit/specs/services/version/version.service.spec.js

12 lines
390 B

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