|
|
4 дней назад | |
|---|---|---|
| .. | ||
| addons | 1 месяц назад | |
| src | 4 дней назад | |
| utils | 4 месяцев назад | |
| README.md | 1 месяц назад | |
| UnitTests.html | 1 месяц назад | |
| UnitTestsAddons.html | 1 месяц назад | |
| puppeteer.unit.js | 1 месяц назад | |
| three.addons.unit.js | 1 месяц назад | |
| three.source.unit.js | 1 месяц назад | |
npm install from the root folderYou can run the unit tests in two ways:
npm run test-unit, npm run test-unit-addons from the root folder.npm run test-unit-headful, npm run test-unit-addons-headful from the root folder.See Installation for more information.
A small number of tests can only be run in a browser environment.
For browser tests, further changes to the library will not be reflected until the page is refreshed.
When adding or updating tests, the most common cause of test failure is forgetting to change QUnit.todo to QUnit.test when the test is ready.
An error that indicates "no tests were found" means that an import statement could not be resolved. This is usually caused by a typo in the import path.
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.