Add tests to #3
ci/woodpecker/pr/woodpecker Pipeline was successful Details

This commit is contained in:
Sol Fisher Romanoff 2022-06-17 20:40:49 +03:00
parent 3806f579b9
commit cea08d41ee
Signed by untrusted user who does not match committer: nbsp
GPG Key ID: 9D3F2B64F2341B62
1 changed files with 8 additions and 0 deletions

View File

@ -8,4 +8,12 @@ describe('extractCommit', () => {
it('return short commit hash without branch name', () => {
expect(extractCommit('1.0.0-45-g5e7aeebc-branch')).to.eql('5e7aeebc')
})
it('return branch name', () => {
expect(extractCommit('1.0.0-branch')).to.eql('branch')
})
it('return version tag', () => {
expect(extractCommit('1.0.0')).to.eql('v1.0.0')
})
})