Permalink
Browse files

Hook: Run Karma Locally (#2284)

* Hook: Run Karma Locally

* Remove newlines

* Rename Script
  • Loading branch information...
hghazzi authored and johnBartos committed Aug 29, 2017
1 parent e322294 commit d7c692a85d13b08d7fe791593e66af41a3cbddba
Showing with 5 additions and 4 deletions.
  1. +3 −3 .github/hooks/pre-push
  2. +2 −1 package.json
View
@@ -5,13 +5,13 @@ echo "Running ESLint & Karma"
npm run lint
lint=$?
if [ $lint -ne 0 ]; then
echo "ESLint Failed. Please fix the errors and push again. \n\n\n\n"
echo "ESLint Failed. Please fix the errors and push again."
exit 1
fi
karma start --browsers=PhantomJS --reporters=mocha
npm run karma:hook
karma=$?
if [ $karma -ne 0 ]; then
echo "Karma Failed. Please fix the failing unit tests and push again. \n\n\n\n"
echo "Karma Failed. Please fix the failing unit tests and push again."
exit 1
fi
View
@@ -74,7 +74,8 @@
"lint:styles": "stylelint './src/css/**/*.less'",
"lint:tests": "eslint './test/*.js'",
"preversion": "grunt && grunt clean:docs && npm run docs && git add docs",
"test": "karma start"
"test": "karma start",
"karma:hook": "karma start --browsers=PhantomJS --reporters=mocha"
},
"engines": {
"node": ">=4.3.1"

0 comments on commit d7c692a

Please sign in to comment.