@@ -32,45 +32,20 @@ test('should reprint input from stdin', async t => {
32
32
t . true ( actual . stdout . includes ( 'foo: bar' ) ) ;
33
33
} ) ;
34
34
35
- test ( 'should produce success output with --verbose flag' , async t => {
36
- const cwd = await git . bootstrap ( 'fixtures/default' ) ;
37
- const actual = await cli ( [ '--verbose' ] , { cwd} ) ( 'type: bar' ) ;
38
- t . true ( actual . stdout . includes ( '0 problems, 0 warnings' ) ) ;
39
- t . is ( actual . stderr , '' ) ;
40
- } ) ;
41
-
42
- test ( 'should produce no output with --quiet flag' , async t => {
35
+ test ( 'should produce no success output with --quiet flag' , async t => {
43
36
const cwd = await git . bootstrap ( 'fixtures/default' ) ;
44
37
const actual = await cli ( [ '--quiet' ] , { cwd} ) ( 'foo: bar' ) ;
45
38
t . is ( actual . stdout , '' ) ;
46
39
t . is ( actual . stderr , '' ) ;
47
40
} ) ;
48
41
49
- test ( 'should produce no output with -q flag' , async t => {
42
+ test ( 'should produce no success output with -q flag' , async t => {
50
43
const cwd = await git . bootstrap ( 'fixtures/default' ) ;
51
44
const actual = await cli ( [ '-q' ] , { cwd} ) ( 'foo: bar' ) ;
52
45
t . is ( actual . stdout , '' ) ;
53
46
t . is ( actual . stderr , '' ) ;
54
47
} ) ;
55
48
56
- test ( 'should produce help for empty config' , async t => {
57
- const cwd = await git . bootstrap ( 'fixtures/empty' ) ;
58
- const actual = await cli ( [ ] , { cwd} ) ( 'foo: bar' ) ;
59
- t . true ( actual . stdout . includes ( 'Please add rules' ) ) ;
60
- t . is ( actual . code , 1 ) ;
61
- } ) ;
62
-
63
- test ( 'should produce help for problems' , async t => {
64
- const cwd = await git . bootstrap ( 'fixtures/default' ) ;
65
- const actual = await cli ( [ ] , { cwd} ) ( 'foo: bar' ) ;
66
- t . true (
67
- actual . stdout . includes (
68
- 'Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint'
69
- )
70
- ) ;
71
- t . is ( actual . code , 1 ) ;
72
- } ) ;
73
-
74
49
test ( 'should fail for input from stdin without rules' , async t => {
75
50
const cwd = await git . bootstrap ( 'fixtures/empty' ) ;
76
51
const actual = await cli ( [ ] , { cwd} ) ( 'foo: bar' ) ;
@@ -284,13 +259,13 @@ test('should print full commit message when input from stdin fails', async t =>
284
259
t . is ( actual . code , 1 ) ;
285
260
} ) ;
286
261
287
- test ( 'should not print commit message fully or partially when input succeeds' , async t => {
262
+ test ( 'should not print full commit message when input succeeds' , async t => {
288
263
const cwd = await git . bootstrap ( 'fixtures/default' ) ;
289
264
const message = 'type: bar\n\nFoo bar bizz buzz.\n\nCloses #123.' ;
290
265
const actual = await cli ( [ ] , { cwd} ) ( message ) ;
291
266
292
267
t . false ( actual . stdout . includes ( message ) ) ;
293
- t . false ( actual . stdout . includes ( message . split ( '\n' ) [ 0 ] ) ) ;
268
+ t . true ( actual . stdout . includes ( message . split ( '\n' ) [ 0 ] ) ) ;
294
269
t . is ( actual . code , 0 ) ;
295
270
} ) ;
296
271
0 commit comments