Add note about DOM when running tests in Node
Closed this issue · 5 comments
jamesplease commented
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.
marcandre commented
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();
jamesplease commented
Good idea. Care to make a PR?
marcandre commented
I indeed should have created a PR, sorry about that. I guess I should also stop complaining about slackers 😏
jamesplease commented
Resolved in #235
jamesplease commented
Thanks again @marcandre !