Closed MangelMaxime closed 3 months ago
we do set the Run F# tests
profile as the default - this happens at https://github.com/ionide/ionide-vscode-fsharp/blob/e607bdfcd34522e24299a525379f0ed8fb828c6f/src/Components/TestExplorer.fs#L1802-L1804
We could change that - what behavior happens when you try to run tests with no default profile selected?
We could change that - what behavior happens when you try to run tests with no default profile selected?
Great question as I cannot have a no default profile selected once one is selected. Let me build a local version of Ionide to test it out.
It looks like we can use 'tags' to target test run profiles - perhaps vite should consider tagging their discovered tests, and we should consider tagging our discovered tests as well. A brief description of how this works is here: https://code.visualstudio.com/api/extension-guides/testing#test-tags
I can't seems to find a way to not have a Default profile selected.
I tried to create a new folder on my machine in case this was due to as cache but no nothing seems to allow me to not have a default profile selected.
However, if both F# and Vitest are selected as default then it works: https://github.com/vitest-dev/vscode/issues/287#issuecomment-2002028260
The test 'tags', seems interesting indeed.
I am closing because it seems like the problem is how Vitest is implemented.
I will re-open if needed.
Thank you for looking into it Chet
Describe the bug
In my project, I am using both F# via Fable and Vitest as my test runner because I need to run the tests on JavaScript.
It looks like because Ionide set its
Run F# tests
as a default profile this conflict with VitestContinuous Run
for a single test.You can find the discussion history on there repo https://github.com/vitest-dev/vscode/issues/287
I am unsure if the problem is with Ionide or Vitest extension.
Steps to reproduce
Clone glutinum-org/cli@vitest_continous_mode_bug
Make sure to select the correct branch, otherwise you will need to generate the tests files etc.
pnpm install
Open VSCode (with both Ionide and Vitest)
Try to run the tests using Vitest UI + Continuous mode
Expected behaviour
Expected behaviour depends, on where the source of the issue is 😅.
I believe right now, the test request is passed to Ionide. If this is the case, then Ionide should notify the user that something is wrong is the test is not an F# test or forward the tests to the next test runner is possible.
I think the first approach is good enough and will help the user think about choosing a Test profile.
Machine info
Additional context
Add any other context about the problem here.