Skip to content

test_runner: automatically wait for subtests to finish

Rodrigo Muino Tomonari requested to merge github/fork/cjihrig/wait into main

Some people feel pretty strongly that the test runner should automatically wait for subtests to finish (by the way, that comment seems like something that someone probably should have moderated). The current behavior is for tests to run and cancel any subtests that have not finished in that time. The idea is that people would use await as needed in this case.

This is what the code would look like to make that automatic waiting happen. I would still need to update the docs if we want to land this. From a user perspective the changes are:

  • Nothing ever needs to be awaited anymore. Existing code that does await subtests continues to work. This is a DX improvement.
  • Subtests that timeout just hang instead of being cancelled if you aren't applying a test timeout. This is a worse DX IMO.

I'd like to know how other people feel about such a change.

cc: @nodejs/test_runner @mcollina

Merge request reports

Loading