@@ -127,6 +127,30 @@ test('should work with husky via commitlint -e %GIT_PARAMS%', async () => {
127
127
await execa ( 'git' , [ 'commit' , '-m' , '"test: this should work"' ] , { cwd} ) ;
128
128
} ) ;
129
129
130
+ test ( 'should work with husky via commitlint -e $HUSKY_GIT_PARAMS' , async ( ) => {
131
+ const cwd = await git . bootstrap ( 'fixtures/husky/integration' ) ;
132
+ await writePkg (
133
+ { scripts : { commitmsg : `'${ bin } ' -e $HUSKY_GIT_PARAMS` } } ,
134
+ { cwd}
135
+ ) ;
136
+
137
+ await execa ( 'npm' , [ 'install' ] , { cwd} ) ;
138
+ await execa ( 'git' , [ 'add' , 'package.json' ] , { cwd} ) ;
139
+ await execa ( 'git' , [ 'commit' , '-m' , '"test: this should work"' ] , { cwd} ) ;
140
+ } ) ;
141
+
142
+ test ( 'should work with husky via commitlint -e %HUSKY_GIT_PARAMS%' , async ( ) => {
143
+ const cwd = await git . bootstrap ( 'fixtures/husky/integration' ) ;
144
+ await writePkg (
145
+ { scripts : { commitmsg : `'${ bin } ' -e %HUSKY_GIT_PARAMS%` } } ,
146
+ { cwd}
147
+ ) ;
148
+
149
+ await execa ( 'npm' , [ 'install' ] , { cwd} ) ;
150
+ await execa ( 'git' , [ 'add' , 'package.json' ] , { cwd} ) ;
151
+ await execa ( 'git' , [ 'commit' , '-m' , '"test: this should work"' ] , { cwd} ) ;
152
+ } ) ;
153
+
130
154
test ( 'should allow reading of environment variables for edit file, succeeding if valid' , async t => {
131
155
const cwd = await git . bootstrap ( ) ;
132
156
await sander . writeFile ( cwd , 'commit-msg-file' , 'foo' ) ;
0 commit comments