WestLangley f8462e371c Matrix3: deprecate `.scale()`, `.rotate()`, and `.translate()` (#33757) 4 дней назад
..
addons fc0c60b1b5 Run unittests in browser with Puppeteer (#33550) 1 месяц назад
src f8462e371c Matrix3: deprecate `.scale()`, `.rotate()`, and `.translate()` (#33757) 4 дней назад
utils d516ced437 Cleanup: remove jshint remnants (#32885) 4 месяцев назад
README.md fc0c60b1b5 Run unittests in browser with Puppeteer (#33550) 1 месяц назад
UnitTests.html fc0c60b1b5 Run unittests in browser with Puppeteer (#33550) 1 месяц назад
UnitTestsAddons.html fc0c60b1b5 Run unittests in browser with Puppeteer (#33550) 1 месяц назад
puppeteer.unit.js fc0c60b1b5 Run unittests in browser with Puppeteer (#33550) 1 месяц назад
three.addons.unit.js fc0c60b1b5 Run unittests in browser with Puppeteer (#33550) 1 месяц назад
three.source.unit.js 245dc45a07 Tests: Add unit test for custom interpolant. (#33480) 1 месяц назад

README.md

Setup

  • Execute npm install from the root folder

Run

You can run the unit tests in two ways:

  • Headless: Execute npm run test-unit, npm run test-unit-addons from the root folder.
    In headless mode the tests will run in a headless browser.
  • Headful: Execute npm run test-unit-headful, npm run test-unit-addons-headful from the root folder.
    In headful mode, a browser window will open, and you can see the tests running.
    While the headful mode is running you can also use any browser to navigate to http://localhost:8080/test/unit/UnitTests.html or http://localhost:8080/test/unit/UnitTestsAddons.html to run the tests in that browser.
    Further changes to the library will not be reflected until the page is refreshed.

See Installation for more information.

Notes

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.

Troubleshooting

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.

Debugging

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.

粤ICP备19079148号