Skip to content

Commit

Permalink
better test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Autre31415 committed Apr 20, 2017
1 parent 51167ad commit 5b0bb10
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@
}
},
"scripts": {
"test": "cross-env NODE_ENV=test mocha --recursive test",
"test": "cross-env NODE_ENV=test npm run test-server && npm run test-client",
"test-server": "cross-env NODE_ENV=test mocha --recursive test",
"test-client": "karma start",
"eslint": "eslint .",
"cover": "cross-env NODE_ENV=cover istanbul cover _mocha --recursive test",
"karma": "karma start"
"coverage": "npm run cover"
},
"pre-commit": [
"test",
Expand Down
4 changes: 3 additions & 1 deletion test/client.html
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,9 @@ <h2>Warning: these tests can only be run from a web server.</h2>
teddy.minify(true);
}
teddy.templates[template] = teddy.compile(req.response || req.responseText);
if (counter++ === templateLength - 1) {
counter++;

if (counter === templateLength) {
mocha.run();
}
}
Expand Down
1 change: 1 addition & 0 deletions test/looping.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ describe('Looping', function() {
}
else if (process.env.NODE_ENV === 'cover') {
teddy.setVerbosity(3);
loopMs = 400;
}
}
});
Expand Down

0 comments on commit 5b0bb10

Please sign in to comment.