We need to add a pre-commit hook to run the tests before anyone does git commit and if the tests pass then only it will create a commit otherwise it will throw an error.
We recommend looking into this package Husky to achieve this. It will also be beneficial if we add a second hook to run yarn format to format our code for maintaining code consistency.
We need to add a pre-commit hook to run the tests before anyone does
git commit
and if the tests pass then only it will create a commit otherwise it will throw an error.We recommend looking into this package Husky to achieve this. It will also be beneficial if we add a second hook to run
yarn format
to format our code for maintaining code consistency.