This is an example of loading client side script into a JSDOM and testing on a node server.
Installation: npm install
- Run the index.js using babel node:
babel-node .
- It will load the script in the
src
folder and then all the*spec.js
files in thetest
folder. - Events will be emitted that could be used to calculate pass and fails.
- JQuery or other libraries could be added to make more complex assertions.
Run tests using Mocha: npm test