Skip to content

Commit ee21582

Browse files
committed
test(cli): update version check for help test
1 parent e564a1e commit ee21582

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

@commitlint/cli/src/cli.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,10 @@ test('should work with relative formatter path', async () => {
438438
test('should print help', async () => {
439439
const cwd = await gitBootstrap('fixtures/default');
440440
const actual = await cli(['--help'], {cwd})();
441-
expect(actual.stdout).toMatchInlineSnapshot(`
442-
"@commitlint/[email protected] - Lint your commit messages
441+
const version = require('../package.json').version;
442+
const stdout = actual.stdout.replace(`@${version}`, '@dev');
443+
expect(stdout).toMatchInlineSnapshot(`
444+
"@commitlint/cli@dev - Lint your commit messages
443445
444446
[input] reads from stdin if --edit, --env, --from and --to are omitted
445447

0 commit comments

Comments
 (0)