- https://jestjs.io/docs/api#describename-fn
- https://jestjs.io/docs/expect
- https://github.com/sapegin/jest-cheat-sheet
Add simple-git-hooks to the project
npm install simple-git-hooks --save-dev
Add simple-git-hooks to your package.json. Fill it with git hooks and the corresponding commands.
For example:
{
"simple-git-hooks": {
"pre-commit": "npx lint-staged",
"pre-push": "npm run typecheck",
// if you'd prefer preserve all unused hooks
"preserveUnused": true,
// if you'd prefer preserve specific unused hooks
"preserveUnused": ["commit-msg"]
}
}
git config core.hooksPath .git/hooks/
rm -rf .git/hooks
# Update ./git/hooks
npx simple-git-hooks
Now all the git hooks are created.
if you change configuration:
npx simple-git-hooks