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

Running test from "Test explorer" changes view to "File explorer" #994

Open
bmutafov opened this issue Jan 20, 2023 · 4 comments
Open

Running test from "Test explorer" changes view to "File explorer" #994

bmutafov opened this issue Jan 20, 2023 · 4 comments
Labels
external-issue issues caused by external system ( (no fix needed) stage: awaiting response

Comments

@bmutafov
Copy link

bmutafov commented Jan 20, 2023

Environment

  1. vscode-jest version: v5.1.0
  2. node -v: v12.22.7
  3. npm -v or yarn --version: npm 6.14.15
  4. npm ls jest or npm ls react-scripts (if you haven’t ejected): react-scripts@5.0.1
  5. your vscode-jest settings if customized:
    • jest.jestCommandLine? npm test --
    • jest.autoRun
{
  "watch": false,
  "onSave": "test-file"
}
  1. Operating system: Windows 11

Prerequisite

  • are you able to run jest test from the command line? Yes
  • how do you run your tests from the command line? (for example: npm run test or node_modules/.bin/jest) npm run test

Steps to Reproduce

  1. Click Test explorer
  2. Click Run test
  3. Sidebar view is switched to File explorer

Relevant Debug Info

VSCode Version:

$ code -v
1.74.3
97dec172d3256f8ca4bfb2143f3f76b503ca0534
x64

Expected Behavior

Sidebar view stays on Test explorer

Actual Behavior

jest-test


The fastest (and the most fun) way to resolve the issue is to submit a pull-request yourself. If you are interested, feel free to check out the contribution guide, we look forward to seeing your PR...

@connectdotz
Copy link
Collaborator

Is there any related error message in the console log?

@connectdotz connectdotz added stage: awaiting response external-issue issues caused by external system ( (no fix needed) labels Feb 10, 2023
@bmutafov
Copy link
Author

Is there any related error message in the console log?

Nothing that I can see, no.

@connectdotz
Copy link
Collaborator

If you run individual tests from the editor gutter menu or test explorer tree item, does it also switch to file explorer? Do you have a sample repo we can try to repro this issue?

@bmutafov
Copy link
Author

Yes, from both it focuses the file in the file explorer. As for a sample repo, I just tried setting up a brand new CRA app with typescript and it is present even there:

npx create-react-app my-app --template typescript

And then try to run App.test.tsx tests. The issue is present for me. VSCode version:

❯ code -v
1.75.1
441438abd1ac652551dbe4d408dfcec8a499b8bf
x64

Extension version v5.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-issue issues caused by external system ( (no fix needed) stage: awaiting response
Projects
None yet
Development

No branches or pull requests

2 participants