|
1 |
| -import {mock, test} from 'node:test'; |
2 |
| -import { strict as assert } from 'assert'; |
3 |
| -import fs from 'fs'; |
4 |
| -import path from 'path'; |
5 |
| -import { EOL } from 'os'; |
| 1 | +import { mock, test } from 'node:test'; |
| 2 | +import { strict as assert } from 'node:assert'; |
| 3 | +import fs from 'node:fs'; |
| 4 | +import path from 'node:path'; |
| 5 | +import { EOL } from 'node:os'; |
6 | 6 | import sh from 'shelljs';
|
7 | 7 | import tmp from 'tmp';
|
8 | 8 | import semver from 'semver';
|
@@ -382,18 +382,18 @@ test('should not bump when whatBump === false', async () => {
|
382 | 382 | }
|
383 | 383 | });
|
384 | 384 |
|
385 |
| -test('should use given whatBump when provided', async () => { |
| 385 | +test('should use given whatBump when provided', async () => { |
386 | 386 | setup();
|
387 | 387 | sh.exec(`git tag 1.0.0`);
|
388 | 388 | add('fix', 'bar');
|
389 |
| - const whatBump = mock.fn() |
| 389 | + const whatBump = mock.fn(); |
390 | 390 | {
|
391 | 391 | const options = getOptions({ whatBump });
|
392 | 392 | await runTasks(...options);
|
393 |
| - assert.ok(whatBump.mock.callCount() > 1) |
394 |
| - const commitHeaders = whatBump.mock.calls[0].arguments[0]?.map((commit) => commit.header) |
395 |
| - assert.strictEqual(commitHeaders.length, 1) |
396 |
| - assert.match(commitHeaders[0], /^fix\(bar\):/) |
| 393 | + assert.ok(whatBump.mock.callCount() > 1); |
| 394 | + const commitHeaders = whatBump.mock.calls[0].arguments[0]?.map(commit => commit.header); |
| 395 | + assert.strictEqual(commitHeaders.length, 1); |
| 396 | + assert.match(commitHeaders[0], /^fix\(bar\):/); |
397 | 397 | }
|
398 | 398 | });
|
399 | 399 |
|
|
0 commit comments