Skip to content

tests before commit

Eugene Krevenets edited this page Feb 23, 2018 · 2 revisions

The Goal: Run tests before commit.

Because right now we don't have CI - Nobody reports us about the state of our commis on github. But we can check them locally and ever automatically.

All that you need is to add the file here:

.git/hooks/pre-commit

with

set -e

cd functions
npm run lint -- --fix
npm run mocha

it should be executable

chmod +x .git/hooks/pre-commit

After that, once you try to commit something test will run on your side before commit. I hope you'll like it

Thanks!

Clone this wiki locally