Skip to content

Commit

Permalink
Hook: Run Karma Locally (#2284)
Browse files Browse the repository at this point in the history
* Hook: Run Karma Locally

* Remove newlines

* Rename Script
  • Loading branch information
hussam-i-am authored and johnBartos committed Aug 29, 2017
1 parent e322294 commit d7c692a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/hooks/pre-push
Expand Up @@ -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
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -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"
Expand Down

0 comments on commit d7c692a

Please sign in to comment.