Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 826 Bytes

Readme.md

File metadata and controls

31 lines (21 loc) · 826 Bytes

Running tests

The unit test are written with Mocha and Chai.

The following assumes all Node.js dependencies were installed via npm install.

Unless otherwise specified run all commands from the root of the repository.

Running unit tests in a browser

Because of CORS opening the runner html page directly from the file system does not work. A HTTP server is needed instead.

Below is an example with Node's http-server.

# Start the server in the root directory of the repository
npx http-server . -c-1

# Open the test runner page
# http://localhost:8080/test/unittest/SpecRunner.html

Running unit test in Node

# Run tests with
npm run test
# Or directly call mocha
npx mocha