node icon indicating copy to clipboard operation
node copied to clipboard

test_runner: print filename before running a test file

Open HinataKah0 opened this issue 1 year ago • 2 comments

I want to get feedbacks first hence opening the draft PR.

If we want something that behave the same when running with/without --test. I think we can emit test:file only if the number of files > 1. Because, without --test we can't run more than 1 file, I tried the following:

./node mytests/ -> error
./node mytests/test-1.mjs mytests/test-2.mjs -> only the 1st is run

If we don't want to introduce a new event, I think there's no proper separation indicator between 2 files. See https://github.com/nodejs/node/issues/48457#issuecomment-1595994564

TODO

  • [ ] Write doc
  • [ ] Update tests
  • [ ] (Maybe) implement this

Fixes: https://github.com/nodejs/node/issues/48457

HinataKah0 avatar Jun 22 '23 12:06 HinataKah0

Review requested:

  • [ ] @nodejs/test_runner

nodejs-github-bot avatar Jun 22 '23 12:06 nodejs-github-bot

If we don't want to introduce a new event, I think there's no proper separation indicator between 2 files.

Files run in parallel anyway, so a new event won't really "separate" them

MoLow avatar Jun 22 '23 12:06 MoLow

Files run in parallel anyway, so a new event won't really "separate" them

I just want to confirm my understanding. Yeah, it won't actually "separate" them but the events will come in order due to this line, right? Even though the files are processed in parallel or tests are running concurrently, the reported events will come in serial eventually.

About this, Actually I am not really sure what will be the appropriate format for displaying it. Do we have any sort of standards to follow?

HinataKah0 avatar Jul 01 '23 06:07 HinataKah0

Yeah, it won't actually "separate" them but the events will come in order due to this line, right?

yeah, it will come in order.

MoLow avatar Jul 02 '23 06:07 MoLow

I propose we close this now that https://github.com/nodejs/node/pull/48975 has been merged.

cjihrig avatar Aug 11 '23 15:08 cjihrig