vscode_deno icon indicating copy to clipboard operation
vscode_deno copied to clipboard

BDD Style Tests Not Detected

Open jherdman opened this issue 2 years ago • 7 comments

Describe the bug

Nested tests are not detected.

To Reproduce

  1. Write a test file, and use the BDD style — make sure you nest your tests!
  2. Note the lack of green test running arrows
  3. De-nest (if you will) one of your examples. It now has a green arrow.

Expected behavior

It should work

Screenshots

Screenshot 2023-01-22 at 1 37 55 PM

Versions

vscode: 1.74.3 deno: 1.29.3 extension: 3.16.0

jherdman avatar Jan 22 '23 18:01 jherdman

Further, a describe with nested cases (i.e. it) do not show green arrows either

jherdman avatar Jan 22 '23 18:01 jherdman

Also the Testing Explorer does not find tests when BDD Styles is applied.

thomas3577 avatar Feb 25 '23 09:02 thomas3577

If someone is willing to guide me a little I'm happy to carve out some time to fix this.

jherdman avatar Mar 04 '23 01:03 jherdman

I would also like it if bdd style tests worked a little better in vscode. I searched around a bit, and I wonder if issue is that the deno LSP doesn't return information about BDD-style tests. Looking at this page, the docs seem to indicate that the lsp server only returns tests & steps. I'm not sure how to query the lsp server directly to figure anything out, but I just thought I'd mention it in case it helps.

pwalker avatar Jul 11 '23 15:07 pwalker

In my case, it seems like BDD-style tests do eventually get picked up by the extension, however, when trying to run them they never finish, and they block the execution of the remaining tests.

Example video demonstration: https://github.com/denoland/vscode_deno/assets/2887321/a058891e-8bb3-43d3-96e8-d31d0a3d64bc

gykf avatar Aug 09 '23 15:08 gykf

Since we have this in std, we should consider the LSP detecting describe()/it() out of the box.

nayeemrmn avatar Aug 30 '23 16:08 nayeemrmn

node:test also isn't detected

wojpawlik avatar Sep 10 '23 16:09 wojpawlik