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 @@ -44,6 +44,20 @@ test('should produce success output with --verbose flag', async () => {
44
44
expect ( actual . stderr ) . toEqual ( '' ) ;
45
45
} ) ;
46
46
47
+ test ( 'should produce last commit and success output with --verbose flag' , async ( ) => {
48
+ const cwd = await gitBootstrap ( 'fixtures/simple' ) ;
49
+ await execa ( 'git' , [ 'add' , 'commitlint.config.js' ] , { cwd} ) ;
50
+ const commit = await execa (
51
+ 'git' ,
52
+ [ 'commit' , '-m' , '"test: this should work"' ] ,
53
+ { cwd}
54
+ ) ;
55
+ const actual = await cli ( [ '--last' , '--verbose' ] , { cwd} ) ( ) ;
56
+ expect ( actual . stdout ) . toContain ( '0 problems, 0 warnings' ) ;
57
+ expect ( actual . stdout ) . toContain ( 'test: this should work' ) ;
58
+ expect ( actual . stderr ) . toEqual ( '' ) ;
59
+ } ) ;
60
+
47
61
test ( 'should produce no output with --quiet flag' , async ( ) => {
48
62
const cwd = await gitBootstrap ( 'fixtures/default' ) ;
49
63
const actual = await cli ( [ '--quiet' ] , { cwd} ) ( 'foo: bar' ) ;
You can’t perform that action at this time.
0 commit comments