Skip to content

Commit d4f0774

Browse files
authored
test(cli): update version check for help test (#2414)
1 parent e564a1e commit d4f0774

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

+4-2
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)