Skip to content

Commit

Permalink
Adding a precommit hook via husky to run npm test
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Sep 21, 2023
1 parent d9da661 commit d4e7728
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .husky/pre-commit
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

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
Expand Up @@ -37,12 +37,14 @@
"mocha": "nyc mocha test/*.js",
"rollup": "rollup --config",
"test": "npm run lint && npm run mocha",
"types": "npx -p typescript tsc src/lru.js --declaration --allowJs --emitDeclarationOnly --outDir ."
"types": "npx -p typescript tsc src/lru.js --declaration --allowJs --emitDeclarationOnly --outDir .",
"prepare": "husky install"
},
"devDependencies": {
"@rollup/plugin-terser": "^0.4.3",
"auto-changelog": "^2.4.0",
"eslint": "^8.49.0",
"husky": "^8.0.3",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"precise": "^2.0.1",
Expand Down

0 comments on commit d4e7728

Please sign in to comment.