husky/test/7_node_modules_path.sh

13 lines
240 B
JavaScript
Raw Permalink Normal View History

2024-07-17 23:41:58 +08:00
#!/bin/sh
. test/functions.sh
setup
install
npx --no-install husky
# Test pre-commit
git add package.json
# Should not fail when running hook
echo 'echo "$PATH" | grep "node_modules/.bin"' > .husky/pre-commit
2024-07-17 23:41:58 +08:00
expect 0 "git commit -m foo"