Skip to content

michaelerobertsjr/node-mocha-client-test-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node Test Runner

This is an example of loading client side script into a JSDOM and testing on a node server.


Installation

Installation: npm install

Usage

  • 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 the test 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.

Tests

Run tests using Mocha: npm test

Helpful References

About

Example of using Node to test client side Javascript with JSDOM

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published