Core: Convert "No tests were run." from fake test to error #1790
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.
Remove hacky re-entrance from ProcessingQueue.done() -> test() + advance() -> done(), existed only for this purpose.
This also removes the need for the 99aee51 workaround, which avoided a crash by infinite loop.
Remove unused internal
test
injection to ProcessingQueue, existed only for this purpose.Remove "omit stack trace" logic in test.js, existed only for this purpose. To keep output for the "No tests" error similarly clean and distraction-free, the TAP reporter treats error stack traces with a similar cleaner since Core: Exclude or grey internal frames from stack traces in TAP reporter #1789.
Remove unused internal
validTest
mechanism existed only for this purpose.This was originally impossible to trigger externally because it required setting
validTest
to a private symbol. In QUnit 1.16 this was simplified as part of commit 3f08a1a, to take any boolean true value to ease some implementation details, however it remained internal in purpose. A search today for/validTest:/
and/validTest = /
over public GitHub-hosted repositories, shows that (fortunatley) nobody has started relying on this. I found only copies of QUnit itself.As a nice side-effect, fixtures like async-module-error.tap.txt now no longer display a useless "No tests" after an uncaught error that already bailed the test run. This happened previously because errors are not tests, and so technically there was no test. Now that "No tests" is itself considered a bail out, TAP absorbs this after the first error, just like it already does for other cascading errors.