diff --git a/test/7_command_not_found.sh b/test/7_command_not_found.sh new file mode 100644 index 000000000..56dd3e3c4 --- /dev/null +++ b/test/7_command_not_found.sh @@ -0,0 +1,13 @@ +. "$(dirname -- "$0")/functions.sh" +setup +install + +npx --no-install husky install + +# Test core.hooksPath +expect_hooksPath_to_be ".husky" + +# Test pre-commit with 127 exit code +git add package.json +npx --no-install husky add .husky/pre-commit "exit 127" +expect 1 "git commit -m foo" diff --git a/test/all.sh b/test/all.sh index 682a853f5..3ca4be8a5 100644 --- a/test/all.sh +++ b/test/all.sh @@ -7,3 +7,4 @@ sh test/3_from-sub-dir.sh sh test/4_not-git-dir.sh sh test/5_set-add.sh sh test/6_git_command_not_found.sh +sh test/7_command_not_found.sh