In our angular application we want to run "ng test" before we push the code to GIT. So do this we integrated with husky for GIT hook.
{ "hooks": { "pre-push": "npm run git-hook" } }
In package.json
, below is mentioned "git-hook": "npm run test-headless"
.
I want to push the code to the rep only if all the test cases execute successfully but currently even if the test cases fail the code push is happening.