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.
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
# Run tests with
npm run test
# Or directly call mocha
npx mocha