Testing tool
Added a tool that invokes Mocha via API rather than via the "mocha" command
distributed with Mocha. This tool runs both ESM and CJS tests. It will also
support web tests but that's currently stubbed out.
There are a few reasons to do this.
First, we run tests against both ESM and CJS. This would be possible with the
standard command but would require us to have two separate Mocha
configurations in every package. This way there are zero mocha configurations
in every package and instead we configure programmatically.
Second, running test suites in a single process is marginally faster as you
avoid the startup time of both npm and mocha.
Third, the output is very concise and can be standardized across test
frameworks (e.g. Mocha and the web test runner).
Finally, we can report log messages as part of the failure message instead of
dumping in real-time as tests fail.