4 ms·
Set up a pre-commit or pre-push hook that will run your tests. https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks https://git-scm.com/book/en/v2/Customiz
by pan69 6y ago
Set up a pre-commit or pre-push hook that will run your tests.
https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
- slooonz 6y agoAnd how do you test that your tests pass in other environments ?
- pan69 6y agoDepends on what you're building, you might not have other environments as such, but I get the point (I'm pro CI for the record). My comment was aimed at: > I forget to run tests locally all the time.
- dgrin91 6y agoThis doesn't solve the problem. New person joins the team, doesn't do this. Now what?
- pan69 6y agoIn JavaScript projects we're using Husky [1]. I'm sure other environments have their own equivalents of it. [1] https://github.com/typicode/husky https://github.com/typicode/husky