This project is an example to create unit tests for a framework control. The tests are working on the ColorChange
control in the ExampleControl
Visual Studio project.
All needed software is delivered via NPM packages. To download and install these you need to call once
npm install
in the same directory with the packages.json
file.
After that you need to start the test webserver by running the following command:
npx jasmine-browser-runner serve
This produces an output which shows an url like this:
Jasmine server is running here: http://localhost:8888
This is the url you need to open with your chrome or firefox.
- spec/support/jasmine-browser.js has the config for the test runner. See comments for more information.
- spec/support/flags.js disables Framework initialisation and Framework logging.
- helpers/mockupHelper.js contains code to instantiate controls outside the running framework environment.
The framework control project itself has the code under test:
- ../ExampleControl/ColorChange/ColorChange.ts contains the control test itself.