Skip to content

Commit

Permalink
tests: parallel tests
Browse files Browse the repository at this point in the history
Several changes to the test suite to support running tests in parallel,
bringing the overall test time down considerably.

- Replace all literal 1337 and 1234 ports with a custom per-process port
  assignment based on the TAP_CHILD_ID environment variable.
- Add common.pkg as a per-test working directory instead of polluting
  __dirname or accidentally reusing the same working directory for
  multiple tests.
- Rework test config handling so that tests don't rely on config setup
  being run in a particular order.
- Remove the npm-registry-couchapp tests, since it (a) relies on
  CouchDB, (b) is no longer a reliable indicator of registry
  compatibility, and (c) is already superceded in most cases by tests
  that use npm-registry-mock.  (A test suite that runs against a
  reference implementation is a thing that should exist, but not here.)
- Remove the fake-registry logging when TAP_CHILD_ID is set, since this
  is extremely hard to make sense of when running multiple tests in
  parallel.

When Node v6 compatibility is dropped in npm v7, we can upgrade to the
latest version of tap for a bit more speed, dropping Domains (and the
associated deprecation warnings), and a fancier test reporter.
  • Loading branch information
isaacs committed Jun 29, 2019
1 parent 36782d3 commit 5a18f51
Show file tree
Hide file tree
Showing 269 changed files with 551 additions and 1,204 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ npm-debug.log
.jshintrc
.eslintrc
.nyc_output
/test/npm_cache*
/node_modules/.cache
Binary file removed node_modules/.cache/esm/.data.blob
Binary file not shown.
1 change: 0 additions & 1 deletion node_modules/.cache/esm/.data.json

This file was deleted.

384 changes: 0 additions & 384 deletions node_modules/.cache/esm/01261cd23ab0e665.js

This file was deleted.

Loading

0 comments on commit 5a18f51

Please sign in to comment.