Skip to content

Commit

Permalink
chore(test): use npm 7 --no option
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode committed Feb 21, 2021
1 parent 52085ab commit 61977ad
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions test/config-dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ cd_and_install_tgz $tempDir
mkdir $configDir

init_git
npx --no-install husky install .config/husky
npx --no-install husky add .config/husky/pre-commit "echo \"msg from pre-commit hook\" && exit 1"
npx --no husky install .config/husky
npx --no husky add .config/husky/pre-commit "echo \"msg from pre-commit hook\" && exit 1"

# Debug
# cat .husky/*
Expand Down
6 changes: 3 additions & 3 deletions test/default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ rm -rf $tempDir
cd_and_install_tgz $tempDir

init_git
npx --no-install husky install
npx --no-install husky add .husky/pre-commit "echo \"msg from pre-commit hook\" && exit 1"
npx --no husky install
npx --no husky add .husky/pre-commit "echo \"msg from pre-commit hook\" && exit 1"

# Debug
# cat .husky/*
Expand All @@ -24,5 +24,5 @@ git add package.json
git commit -m "should fail" || echo -e "\e[0;32mOK\e[m"

# Uninstall
npx --no-install husky uninstall
npx --no husky uninstall
git config core.hooksPath || echo -e "\e[0;32mOK\e[m"
2 changes: 1 addition & 1 deletion test/not-git-dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ rm -rf $tempDir
cd_and_install_tgz $tempDir

# Should not fail
npx --no-install husky install && echo -e "\e[0;32mOK\e[m"
npx --no husky install && echo -e "\e[0;32mOK\e[m"
2 changes: 1 addition & 1 deletion test/sub-dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ EOL
npm run postinstall

# Add hook
npx --no-install husky add pre-commit "echo \"msg from pre-commit hook\" && exit 1"
npx --no husky add pre-commit "echo \"msg from pre-commit hook\" && exit 1"

# Debug
# cat .husky/*
Expand Down

0 comments on commit 61977ad

Please sign in to comment.