When I use git add -p or even git add some files it will run my tests before the commit however the tests pass because of the unstaged changes I have locally.
If I were to stash before running npm test then the tests would have failed.
Is it the responsibility of pre-commit to ensure that the tests pass based on only the staged changes or is that the users responsibility ?