-
Notifications
You must be signed in to change notification settings - Fork 294
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
Extension does not activate automatically when jest.rootPath setting is used #897
Comments
Looks as if this extension has problems if the directory structure is just a little bit different to what might be the "standard". For example: We don't have package.json at the root of the repository. Instead we have a directory Getting this extension to work correctly, is a big challenge. For example, while using "Jest: Start All Runners" from the command palette appears to do something, it does not find tests. jest-cli finds the tests, though, and executes them. Note: We are using dev containers so the location of this extension in the container seems to be |
@mjs510 you are right. The current auto-activation is "shallow", i.e. it only check the root folder. I am planning to change that in the next release. Thanks for the reminder. @ManfredLange if it worked when you open the "service" folder as root, then you can do what @njs510 did by setting the |
this issue should be fixed in v5 pre-release, feel free to give it a spin and let us know how it works for you. Thanks. |
I was facing same issue, switched to pre release version and vscode-jest automatically spins up now 👏 🙇♂️ |
I am facing the same issue now in version 6.2.5. I am using submodules.
in .vscode's settings I have configured rootpath:directory1/submodules/root-project-of-node and configured jest command line while opening code extension is not activated automatically need help in setting up vs code multi root or multi folders configuration please post links or references to follow . thanks in advance |
I have a workspace containing a tests/ sub-folder. This folder is the root for my tests, and contains its own package.json, node_modules etc. The root of my workspace is not a node project.
Reading, https://github.com/jest-community/vscode-jest/blob/master/README.md#i-dont-see-jest-in-the-bottom-status-bar I would expect that setting jest.rootPath to
tests
in this workspace would cause the extension to activate automatically, but this is not the case. The extension does activate successfully if I run "Jest: Start All Runners" via command palette.Environment
vscode-jest version
: 4.6.0node -v
: 14.2.0npm -v
oryarn --version
: 6.14.7npm ls jest
ornpm ls react-scripts
(if you haven’t ejected): /path/to/workspace-root/testsPrerequisite
node_modules/.bin/jest
Steps to Reproduce
Expected Behavior
/tmp/vscode-jest-root-path/.vscode/settings.json sets jest.rootPath to
tests
so I would expect the jest extension to activate when I launch code in this folder.Actual Behavior
The extension does not activate automatically, but does activate successfully if I run "Jest: Start All Runners" via command palette.
The text was updated successfully, but these errors were encountered: