Skip to content

Commit

Permalink
Merge pull request #235 from marcandre/comments
Browse files Browse the repository at this point in the history
Comments
  • Loading branch information
jamesplease committed Oct 9, 2015
2 parents a62e1e0 + be1f813 commit f35fdd4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ can be changed](https://github.com/babel/generator-babel-boilerplate#i-want-to-c

Run `gulp build` to compile the source into a distributable format.

Put your unit tests in `test/unit`. The `gulp` command runs the tests.
Put your unit tests in `test/unit`. The `gulp` command runs the tests using Node. If your library / tests uses features of the DOM, see the `test/setup/node.js` file.

### Gulp tasks

Expand Down
2 changes: 1 addition & 1 deletion app/templates/gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ gulp.task('test', ['lint-src', 'lint-test'], test);
// Set up coverage and run tests
gulp.task('coverage', ['lint-src', 'lint-test'], coverage);

// Set up a livereload environment for our spec runner
// Set up a livereload environment for our spec runner `test/runner.html`
gulp.task('test-browser', testBrowser);

// Run the headless unit tests as you make changes.
Expand Down
1 change: 1 addition & 0 deletions app/templates/test/runner.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!doctype html>
<!-- You need to run `gulp test-browser` before opening this in your browser -->
<html lang='en'>
<head>
<meta charset='utf-8'>
Expand Down
8 changes: 8 additions & 0 deletions app/templates/test/setup/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@ global.chai.use(require('sinon-chai'));

require('babel-core/register');
require('./setup')();

/*
Uncomment the following if your library uses features of the DOM,
for example if writing a jQuery extension, and
add 'simple-jsdom' to the `devDependencies` of your package.json
*/
// import simpleJSDom from 'simple-jsdom';
// simpleJSDom.install();

0 comments on commit f35fdd4

Please sign in to comment.