Skip to content

Commit

Permalink
Add husky pre-commit hook to run npm test
Browse files Browse the repository at this point in the history
  • Loading branch information
nikiwycherley committed Sep 20, 2024
1 parent d0ffdd1 commit 98ca1b5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm test
16 changes: 16 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"unit-test": "lab test -v -c --coverage-exclude lib/helpers -r console -o stdout -r lcov -o coverage/lcov.info -m 5000",
"test-config": "bin/create-test-config",
"test": "npm run lint && npm run unit-test",
"validate-config": "node ./config/index.js"
"validate-config": "node ./config/index.js",
"prepare": "husky"
},
"author": "The Environment Agency",
"license": "OGL",
Expand All @@ -27,6 +28,7 @@
"devDependencies": {
"@hapi/code": "^9.0.3",
"@hapi/lab": "^25.3.1",
"husky": "^9.1.6",
"serverless": "^3.35.2",
"standard": "17.1.2"
}
Expand Down

0 comments on commit 98ca1b5

Please sign in to comment.