Files
husky/test/set-add.sh
T
2021-03-29 09:26:19 +02:00

18 lines
398 B
JavaScript

. "$(dirname "$0")/_functions.sh"
setup
install
f=".husky/pre-commit"
npx --no-install husky install
npx --no-install husky add $f "foo"
grep -m 1 _ $f && grep foo $f && ok
npx --no-install husky add .husky/pre-commit "bar"
grep -m 1 _ $f && grep foo $f && grep bar $f && ok
npx --no-install husky set .husky/pre-commit "baz"
grep -m 1 _ $f && grep foo $f || grep bar $f || grep baz $f && ok