Indicate when a test is started in test_runner

What is the problem this feature will solve?

When running tests in an editor (like VS Code), users want to know what test is currently being executed. This is useful, so if a test is hanging for instance, it's easy to see what it is.

What is the feature you are proposing to solve the problem?

Currently, TAP output for a test like...

describe("math", () => {
  it("addition",async () => {
    strictEqual(1 + 1, 2);
  });
});

looks like this:

# Subtest: math
    # Subtest: addition
    ok 1 - addition
      ---
      duration_ms: 1.369826
      ...

The "Subtest:` comment, and following assertion result, is only printed once the test completes. Two good alternatives would be to:

  • Print the Subtest: comment when the test is started, rather than when it finishes, or
  • Just print some other comment when the test is started

(The former is breaking for the way I handle logs in VS Code's runner, but this is due to my own hackery; not sure if any others will be affected)

What alternatives have you considered?

No response