Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test runner conflicts with other test runners when running a single test in Continous Run #1995

Closed
MangelMaxime opened this issue Mar 16, 2024 · 5 comments

Comments

@MangelMaxime
Copy link
Contributor

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 Vitest Continuous Run for a single test.

You can find the discussion history on there repo vitest-dev/vscode#287

I am unsure if the problem is with Ionide or Vitest extension.

Steps to reproduce

  1. 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.

  2. pnpm install

  3. Open VSCode (with both Ionide and Vitest)

  4. 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

  • OS: Mac
  • .NET SDK version: 8.0.100
  • Ionide version: 7.18.2

Additional context

Add any other context about the problem here.

@baronfel
Copy link
Contributor

we do set the Run F# tests profile as the default - this happens at

testController.createRunProfile ("Run F# Tests", TestRunProfileKind.Run, runHandler, true)
|> unbox
|> context.subscriptions.Add

We could change that - what behavior happens when you try to run tests with no default profile selected?

@MangelMaxime
Copy link
Contributor Author

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.

@baronfel
Copy link
Contributor

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

@MangelMaxime
Copy link
Contributor Author

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: vitest-dev/vscode#287 (comment)

The test 'tags', seems interesting indeed.

@MangelMaxime
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants