Restore mocha as a test runner option for easier dev debugging #89
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.
Switching our test suite from mocha-chrome to web-test-runner has been a big win for CI:
However, when debugging locally, web-test-runner has some tedious downsides compared to mocha:
npm run debug
in order to load the testit.only
if we want to run a single testnpm run debug
each time we make a changeThis PR restores mocha to the testing situation as an additional option, purely for use in local debugging, so we can just open
test/index.html
in a browser like before! Of course, there are some caveats:fetch
, which is incompatible with thefile://
protocoltest/index.html
andweb-test-runner.config.mjs
I can imagine ways to address most of these caveats, but they're out of scope for this PR.
I plan to exercise my commit bit and merge this myself if there aren't any objections, so this PR is mostly a FYI for @1cg and @MichaelWest22, but please do comment if you have any feedback!