connor4312 / nodejs-testing

VS Code integration for node:test native tests
MIT License
43 stars 6 forks source link

Dynamically named tests are missing #39

Open dvirtz opened 1 month ago

dvirtz commented 1 month ago

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.

connor4312 commented 1 month ago

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

dvirtz commented 1 month ago

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