Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tripodsan committed Jun 30, 2023
1 parent e11f816 commit eb37621
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/git-utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ describe('Testing GitUtils', () => {
assert.equal(await GitUtils.getBranch(testRoot), 'newbranch');
shell.exec('git tag v0.0.0');
assert.equal(await GitUtils.getBranch(testRoot), 'v0.0.0');
shell.exec('git checkout HEAD^');
});

it('getBranch #unit (detached)', async () => {
shell.exec('git checkout -b newbranch');
assert.equal(await GitUtils.getBranch(testRoot), 'newbranch');
shell.exec('git checkout --detach HEAD^');
assert.equal(await GitUtils.getBranch(testRoot), 'main');
assert.equal(await GitUtils.getBranch(testRoot, 'customFallbackValue'), 'customFallbackValue');
});
Expand Down

0 comments on commit eb37621

Please sign in to comment.