|
|
2 years ago | |
|---|---|---|
| .. | ||
| src | 2 years ago | |
| utils | 2 years ago | |
| README.md | 2 years ago | |
| UnitTests.html | 2 years ago | |
| three.source.unit.js | 2 years ago | |
npm install from the root folderYou can run the unit tests in two environments:
npm run test-unit from the root foldernpx servez -p 8080 --ssl (or run any other local web sever) from the root folder and access https://localhost:8080/test/unit/UnitTests.html in a web browser.See How to run things locally for more information.
Some tests can only be run in a browser environment.
For browser tests, futher changes to the library will not be reflected until the page is refreshed.
When adding or updating tests, the cost common cause of test failure is forgetting to change QUnit.todo to QUnit.test when the test is ready.
To debug a test, add debugger; to the test code. Then, run the test in a browser and open the developer tools. The test will stop at the debugger statement and you can inspect the code.