@@ -263,12 +263,13 @@ test('creates git hooks and removes unused but preserves specific git hooks', ()
263263} )
264264
265265test . each ( [
266- [ 'npx' , 'simple-git-hooks' ] ,
267- [ 'node' , require . resolve ( `./cli` ) ] ,
268- ] ) ( 'creates git hooks and removes unused but preserves specific git hooks for command: %s %s ./git-hooks.js' , ( command , arg1 ) => {
266+ [ 'npx' , 'simple-git-hooks' , './git-hooks.js' ] ,
267+ [ 'node' , require . resolve ( `./cli` ) , './git-hooks.js' ] ,
268+ [ 'node' , require . resolve ( `./cli` ) , require . resolve ( `${ projectWithCustomConfigurationFilePath } /git-hooks.js` ) ] ,
269+ ] ) ( 'creates git hooks and removes unused but preserves specific git hooks for command: %s %s %s' , ( ...args ) => {
269270 createGitHooksFolder ( projectWithCustomConfigurationFilePath )
270271
271- spc . setHooksFromConfig ( projectWithCustomConfigurationFilePath , [ command , arg1 , './git-hooks.js' ] )
272+ spc . setHooksFromConfig ( projectWithCustomConfigurationFilePath , args )
272273 const installedHooks = getInstalledGitHooks ( path . normalize ( path . join ( projectWithCustomConfigurationFilePath , '.git' , 'hooks' ) ) )
273274 expect ( JSON . stringify ( installedHooks ) ) . toBe ( JSON . stringify ( { 'pre-commit' :`#!/bin/sh\nexit 1` , 'pre-push' :`#!/bin/sh\nexit 1` } ) )
274275
0 commit comments