Home Manual Reference Source Test Demo

Testing

You can run a single run of all unit tests in the application with npm run test. Or the tests will be run after the compilation has finished when running npm run start-watch. The testing is managed by Karma and configured using the karma.conf.js file(github)

This config file defines:

Bootstrap File

The testing bootstrap file(github) finds all of the test files and imports global objects that can be used in all tests to simplify each test file. It also creates a sinon Sandbox that is reset before each test for mocking/stubbing services and non-tested functions in the test context.

Global Variables (available in all .spec files):

Test Notes/Ideas