nodejs-testing icon indicating copy to clipboard operation
nodejs-testing copied to clipboard

Dynamically named tests are missing

Open dvirtz opened this issue 1 year ago • 2 comments

Dynamically named tests like

void test("JSON tests", async (context) => {
  const input = ...;
  await context.test(`Converts ${input} parquet to JSON`, async () => {
  ...
  });
});

don't appear in the test explorer although they do run image

And if there's a failure I only get a 1 subtest failed message without any other details.

dvirtz avatar May 22 '24 13:05 dvirtz

This is because tests are parsed from the AST, and it doesn't do any evaluation.

At some point I will probably port my evalution logic from https://github.com/microsoft/vscode-extension-test-runner/blob/main/src/extract/evaluate.ts into this

connor4312 avatar May 22 '24 14:05 connor4312

Thanks. I previously used https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest which also supports this

dvirtz avatar May 22 '24 16:05 dvirtz