Remove unused tasks and update instructions
This commit is contained in:
@@ -14,24 +14,17 @@ Install the test dependencies (from the root of the repository):
|
||||
|
||||
npm install
|
||||
|
||||
Run the tests once with PhantomJS:
|
||||
Run the tests once:
|
||||
|
||||
make test
|
||||
npm test
|
||||
|
||||
(Note that for `npm` users, this can also be run as `npm test`.)
|
||||
To run the tests continuously:
|
||||
|
||||
Run the tests in a browser:
|
||||
npm run karma
|
||||
|
||||
make serve
|
||||
|
||||
(Again for `npm` users, this is `npm start`.)
|
||||
|
||||
Now visit http://localhost:3000/test/ in your browser. The tests will re-run
|
||||
any time one of the source or spec files changes.
|
||||
|
||||
Tip for TDD'ers: to make PhantomJS run the test suite continuously each time
|
||||
a spec file is changed you can use nosier (http://pypi.python.org/pypi/nosier)
|
||||
and do `nosier -p test -p src "make test"`.
|
||||
After this, the test server is listening on http://localhost:9876/, and you can
|
||||
attach any number of browsers for testing (during development, tests will run
|
||||
in Chrome by default).
|
||||
|
||||
# Rendering tests
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ var path = require('path');
|
||||
* The config below is not enough to run Karma. In addition, we need to add
|
||||
* all library files in dependency order. This could be done with a plugin if
|
||||
* Karma supported async plugins (there may other alternatives as well). But
|
||||
* for now we start Karma with the `tasks/test-all.js` script. This script
|
||||
* for now we start Karma with the `tasks/test.js` script. This script
|
||||
* sorts dependencies and add files to the Karma config below.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
/* eslint-disable no-console */
|
||||
|
||||
module.exports = {
|
||||
afterEnd: function(runner) {
|
||||
var fs = require('fs');
|
||||
var coverage = runner.page.evaluate(function() {
|
||||
return window.__coverage__;
|
||||
});
|
||||
|
||||
if (coverage) {
|
||||
console.log('Writing coverage to coverage/coverage.json');
|
||||
fs.write('coverage/coverage.json', JSON.stringify(coverage), 'w');
|
||||
} else {
|
||||
console.log('No coverage data generated');
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user