@@ -140,11 +140,12 @@ test('guides and forces setup while preserving existing hooks', ({
140140
141141 const forcedOutput = runSetupSuccessfully ( [ '--force' ] ) ;
142142 expect ( forcedOutput ) . toContain (
143- 'The previous Git hooks path ".git /hooks" is now inactive: pre-commit .' ,
143+ 'info Rstack now manages Git hooks at ".rstack /hooks/_" .' ,
144144 ) ;
145145 expect ( forcedOutput ) . toContain (
146- 'The existing files were preserved and will become active again if core.hooksPath is unset .' ,
146+ 'Existing hooks in ".git/hooks" were preserved but will no longer run: pre-commit .' ,
147147 ) ;
148+ expect ( forcedOutput ) . toContain ( 'Unset core.hooksPath to restore them.' ) ;
148149 expect ( git ( [ 'config' , '--local' , '--get' , 'core.hooksPath' ] ) ) . toBe ( hooksPath ) ;
149150
150151 git ( [ 'hook' , 'run' , 'pre-commit' ] ) ;
@@ -155,7 +156,7 @@ test('guides and forces setup while preserving existing hooks', ({
155156 expect ( existsSync ( path . join ( cwd , 'old-hook-ran' ) ) ) . toBe ( true ) ;
156157
157158 expect ( runSetupSuccessfully ( [ '-f' ] ) ) . toContain (
158- 'The previous Git hooks path ".git/hooks" is now inactive : pre-commit.' ,
159+ 'Existing hooks in ".git/hooks" were preserved but will no longer run : pre-commit.' ,
159160 ) ;
160161} ) ;
161162
@@ -171,10 +172,13 @@ test('reports how to restore a replaced hooks path', ({ expect }) => {
171172
172173 const output = runSetupSuccessfully ( [ '--force' ] ) ;
173174 expect ( output ) . toContain (
174- 'The previous Git hooks path ".husky/_" is now inactive: pre-commit .' ,
175+ 'info Rstack now manages Git hooks at ".rstack/hooks/_" .' ,
175176 ) ;
176177 expect ( output ) . toContain (
177- 'The existing files were preserved. Set core.hooksPath back to this path to use them again.' ,
178+ 'Existing hooks in ".husky/_" were preserved but will no longer run: pre-commit.' ,
179+ ) ;
180+ expect ( output ) . toContain (
181+ 'Set core.hooksPath back to ".husky/_" to restore them.' ,
178182 ) ;
179183} ) ;
180184
0 commit comments