Added abort call to tests when tests fail

This is to make sure that pre-commit hooks stop committing when tests fail.