"obvious-closure-library": "^20140401.0.2",
"parse-data-uri": "^0.2.0",
"phantomjs": "^1.9.7-8",
+ "pre-commit": "^1.0.6",
"source-map": "^0.4.2",
"uglify-js": "^2"
},
"scripts": {
- "test": "make test"
- }
+ "test": "make test",
+ "tests-ok": "./scripts/check-no-only.sh"
+ },
+ "pre-commit": [
+ "tests-ok"
+ ]
}
--- /dev/null
+#!/bin/bash
+# Checks that no ".only" has made it into tests. This should never be commited,
+# since it will disable the vast majority of tests.
+
+if grep -R '\.only(' auto_tests/tests; then
+ echo 'Remove .only from tests before committing.'
+ exit 1
+fi
+
+exit 0