We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d71cd3 commit 074f9b3Copy full SHA for 074f9b3
@commitlint/cli/src/cli.test.js
@@ -82,6 +82,17 @@ test('should produce no error output with -q flag', async t => {
82
t.is(actual.code, 1);
83
});
84
85
+test('should throw for unknown --format', async t => {
86
+ const cwd = await git.bootstrap('fixtures/empty');
87
+ const actual = await cli(['--format=foo'], {cwd})('foo: bar');
88
+ t.is(actual.code, 1);
89
+ t.true(
90
+ actual.stdout.includes(
91
+ '--format must be on of: [commitlint,json], received "foo"'
92
+ )
93
+ );
94
+});
95
+
96
test('should produce json output with --format=json', async t => {
97
const cwd = await git.bootstrap('fixtures/empty');
98
const actual = await cli(['--format=json'], {cwd})('foo: bar');
0 commit comments