babel/generator-babel-boilerplate

Add note about DOM when running tests in Node

Closed this issue · 5 comments

The Parsley team ran into an issue where they were running tests in Node, but didn't load up a server-side implementation of the DOM, like JSDom. So jQuery blew up.

I should add a note in the README about making sure to load the tools you need for the tests to work on the server! This jQuery use case is prob. a big one.

Maybe commented code in setup/node.js would be a good start:

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

Good idea. Care to make a PR?

I indeed should have created a PR, sorry about that. I guess I should also stop complaining about slackers 😏

Resolved in #235

Thanks again @marcandre !