move tests from pre-commit hook into separate script