Skip to content

Commit 977e543

Browse files
committed
Update test scripts & git hooks
1 parent 0ae5a3a commit 977e543

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.husky/pre-commit

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
npm test
54
npx lint-staged

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"scripts": {
1212
"build": "netlify build",
1313
"test": "jest",
14+
"test:staged": "CI=true jest --env=jsdom --findRelatedTests",
1415
"version": "auto-changelog -p --template keepachangelog && git add CHANGELOG.md",
1516
"prepublishOnly": "git push && git push --tags && gh-release",
1617
"prepare": "husky install"
@@ -46,6 +47,7 @@
4647
},
4748
"lint-staged": {
4849
"*.js": [
50+
"npm run test:staged",
4951
"eslint --cache --fix",
5052
"prettier --write"
5153
]

0 commit comments

Comments
 (0)