-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Testing
There are two types of tests in noVNC: manual test pages and automated Mocha tests.
The manual test pages take the form of HTML files (although some of the HTML files are used for running Mocha tests -- see below). They can be run by simply opening them up in a web browser and interacting with them.
First run npm install
(not as root) at top level in your noVNC source code directory.
The tests take the form of Javascript files named test.*.js
found in the /tests folder. We use Karma to run our tests. You can launch Karma manually, or simply run npm test
. Then use a browser of your choosing and surf to the Karma server, see details in the output from the previous command. The Karma debug page will display the tests in normal mocha form, if you need it.
New tests should be written using the Mocha test platform and the Chai assertion library. You do not need to do anything special to use these libraries in your tests. The tests should be placed in the tests
directory, and should follow the naming convention of test.whatever_it_is_you_are_testing.js
. There are several example tests to get you started.
The wiki is read-only because of malware spam that GitHub refuses to provide protection agains. Contact the maintainers directly with changes you'd like to make.