Skip to content

Commit

Permalink
test: ensure commits are passed as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlj95 committed Nov 9, 2024
1 parent 13ed283 commit 7e05eae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,11 +384,16 @@ test('should not bump when whatBump === false', async () => {

test('should use given whatBump when provided', async () => {
setup();
sh.exec(`git tag 1.0.0`);
add('fix', 'bar');
const whatBump = mock.fn()
{
const options = getOptions({ whatBump });
await runTasks(...options);
assert.ok(whatBump.mock.callCount() > 1)
const commitHeaders = whatBump.mock.calls[0].arguments[0]?.map((commit) => commit.header)
assert.strictEqual(commitHeaders.length, 1)
assert.match(commitHeaders[0], /^fix\(bar\):/)
}
});

Expand Down

0 comments on commit 7e05eae

Please sign in to comment.