Closed drk-mtr closed 1 year ago
Thanks for reporting it, @drk-mtr! Could you provide a repository with the code that is producing this, please?
@drk-mtr are you using a test explorer extension, or are you relying on Ionide's built-in test detection? Ionide's version is built on source code analysis only, and so any changes to pick up testTask would need to happy by adding to the list of known identifiers here
@baronfel Oh, I didn't know about that, I guess the fix is really simple then!
@ratsclub want to try sending a PR over with the change?
@baronfel I opened the PR there.
@drk-mtr The fix should be included in FsAutoComplete's next release.
Brilliant, thank you!
Hi,
I'm not sure if this is an issue here, or in Ionide or FSAutoComplete, but - I seem to have a similar situation with testTheory
-
The test explorer pane is listing the tests from the testTheory, but the editor window has no markers for the test, and right click -> run tests at cursor seems to either run everything in the test list, or just the previous test case in the file
I thought this was maybe the same situation as the op, where FsAutoComplete needs to be taught to recognize 'testTheory' but then I see that Ionide has recently had a rework to how test discovery works, so I'm not sure where the responsibility lies.
Thanks
@Numpsy testTheory
items show in the explorer due to the new changes that base the explorer on test results.
The code locations of tests are still found exclusively through code analysis. A code location is necessary for the gutter decorations you noticed as missing.
In short, this is the same issue as before. This method in the code analyzer needs to be looking for testTheory
.
Ok, thanks. I can see about doing a PR for it, if no one else gets to it before I manage to build FsAutoComplete (never tried before)
@Numpsy yes, we'd love any and all enhancements to the test discovery in FSAC!
Ok, my tests are getting highlighted now ith Ionide 7.11:
When using the test explorer in VS code, tests that use the
test
ortestAsync
approach are picked up fine as expected, but tests of typetestTask
are not.This could well be user error or unsupported functionality in the VS Code test explorer, rather than an Expecto issue specifically, because in Visual Studio I can see
testTask
tests (even if their names are built programmatically, which is rather impressive).Repro
dotnet new expecto
.dotnet build
.testTask
to the samples test list.Expected: All tests including
testTask
are discovered i.e. can be run via UI. Actual:testTake
cannot be run, others can.Notes
Issue also present in Visual Studio.
Versions:
Workaround
This works but is not ideal:
Thanks for the brilliant library!