File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,20 @@ test('should produce success output with --verbose flag', async () => {
52
52
expect ( actual . stderr ) . toEqual ( '' ) ;
53
53
} ) ;
54
54
55
+ test ( 'should produce last commit and success output with --verbose flag' , async ( ) => {
56
+ const cwd = await gitBootstrap ( 'fixtures/simple' ) ;
57
+ await execa ( 'git' , [ 'add' , 'commitlint.config.js' ] , { cwd} ) ;
58
+ const commit = await execa (
59
+ 'git' ,
60
+ [ 'commit' , '-m' , '"test: this should work"' ] ,
61
+ { cwd}
62
+ ) ;
63
+ const actual = await cli ( [ '--last' , '--verbose' ] , { cwd} ) ( ) ;
64
+ expect ( actual . stdout ) . toContain ( '0 problems, 0 warnings' ) ;
65
+ expect ( actual . stdout ) . toContain ( 'test: this should work' ) ;
66
+ expect ( actual . stderr ) . toEqual ( '' ) ;
67
+ } ) ;
68
+
55
69
test ( 'should produce no output with --quiet flag' , async ( ) => {
56
70
const cwd = await gitBootstrap ( 'fixtures/default' ) ;
57
71
const actual = await cli ( [ '--quiet' ] , { cwd} ) ( 'foo: bar' ) ;
You can’t perform that action at this time.
0 commit comments