Skip to content

Commit

Permalink
test: fix yarn v1 test
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode committed Mar 2, 2021
1 parent 4c52a12 commit 77a7f03
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions test/init-yarn-1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,15 @@ mkdir -p $tempDir

# Install
cp $tgz $tempDir/husky.tgz
yarn set version berry
cd $tempDir && yarn init -y && yarn add ./husky.tgz
cd $tempDir
yarn init -y && yarn add ./husky.tgz

init_git
yarn husky init
npm set-script test "echo \"msg from pre-commit hook\" && exit 1"

# Debug
# cat .husky/*

# Test package.json scripts
grep '"postinstall": "husky install"' package.json || ok
grep '"prepublishOnly": "pinst --disable"' package.json || ok
grep '"postpublish": "pinst --enable"' package.json || ok
grep '"prepare": "husky install"' package.json || ok

# Test core.hooksPath
test_hooksPath ".husky"
Expand Down

0 comments on commit 77a7f03

Please sign in to comment.