@@ -101,6 +101,24 @@ test('should work with husky commitmsg hook in sub packages', async () => {
101
101
await execa ( 'git' , [ 'commit' , '-m' , '"test: this should work"' ] , { cwd} ) ;
102
102
} ) ;
103
103
104
+ test ( 'should work with husky via commitlint -e $GIT_PARAMS' , async ( ) => {
105
+ const cwd = await git . bootstrap ( 'fixtures/husky/integration' ) ;
106
+ await writePkg ( { scripts : { commitmsg : `${ bin } -e $GIT_PARAMS` } } , { cwd} ) ;
107
+
108
+ await execa ( 'npm' , [ 'install' ] , { cwd} ) ;
109
+ await execa ( 'git' , [ 'add' , 'package.json' ] , { cwd} ) ;
110
+ await execa ( 'git' , [ 'commit' , '-m' , '"test: this should work"' ] , { cwd} ) ;
111
+ } ) ;
112
+
113
+ test ( 'should work with husky via commitlint -e %GIT_PARAMS%' , async ( ) => {
114
+ const cwd = await git . bootstrap ( 'fixtures/husky/integration' ) ;
115
+ await writePkg ( { scripts : { commitmsg : `${ bin } -e %GIT_PARAMS%` } } , { cwd} ) ;
116
+
117
+ await execa ( 'npm' , [ 'install' ] , { cwd} ) ;
118
+ await execa ( 'git' , [ 'add' , 'package.json' ] , { cwd} ) ;
119
+ await execa ( 'git' , [ 'commit' , '-m' , '"test: this should work"' ] , { cwd} ) ;
120
+ } ) ;
121
+
104
122
test ( 'should pick up parser preset and fail accordingly' , async t => {
105
123
const cwd = await git . bootstrap ( 'fixtures/parser-preset' ) ;
106
124
const actual = await cli ( [ '--parser-preset' , './parser-preset' ] , { cwd} ) (
0 commit comments