dd-trace-js icon indicating copy to clipboard operation
dd-trace-js copied to clipboard

run core tests in parallel

Open bengl opened this issue 3 years ago • 0 comments

What does this PR do?

This uses tap to run tests instead of mocha. This comes with the following advantages:

  1. Tests run in parallel.
  2. Tests run in isolation.

Under this approach, tests are less prone to failure due to the environment being modified by other tests.

In future commits, other tests can be converted to use tap if desired.

Motivation

Sequential non-isolated tests meant that anything could break in unrelated tests at any time. Some tests aren't cleaning up properly, and it's very difficult to figure out which ones. It's much safer to run each test file in its own process, and using tap is far easier than trying to get mocha to do what we want here. Luckily it supports mocha's API without issue.

bengl avatar Mar 07 '22 22:03 bengl