Tests: Suggestion, Add npm run test-unit-examples command #20900
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue: #20795 (comment)
Background
Currently the examples unit tests are run only on
http://localhost:8080/test/unit/UnitTests.html
and there are no npm command to run them on Node.js.Suggestion
I'd like to suggest to add a npm command to run the examples unit tests because it would be helpful for the quick tests.
Changes
npm run test-unit-examples
command topackage.json
npm run unit-examples
command totest/package.json
GLTFLoader/Exporter
which don't run on Node.js to-webonly
(See Tests: Suggestion, Introduce -webonly keyword to QUnit.module name for skipping the tests on Node.js #20884)I haven't let the root
npm run test
command invokenpm run test-unit-examples
yet because I'm on the fence about it.Screenshot
It shows
npm run test-unit-examples
works. As you see the examples unit tests cause console warnings similar to #20760. I hope we can remove them in another PR.This contribution is made at a hotel where I stay for quarantines.