node -v: v10.16.2npm -v: 6.10.3npm ls jest or npm ls react-scripts (if you haven’t ejected): [email protected]your vscode-jest settings if customized:
Operating system: Win 10
npm run test or node_modules/.bin/jest) npm run test"jest.disabledWorkspaceFolders": [
".history"
],I expected the test from the .history folder not to be executed, as I put the folder name in the jest.disabledWorkspaceFolders setting.
The tests in the folders will be executed every time with the others.
This problem has nothing to do with the other extension, as I could have created the folder and files my self for whatever purpose. I just did name it here to show that this is not an unusual scenario.
I believe vscode-jest auto-inserts the "jest.disabledWorkspaceFolders" settings into the wrong place when you click on the UI to insert it. I had to put it in my workspace settings and specifically put it inside the "settings" key/object, so in your case it'd look something like:
{
"settings": {
"jest.disabledWorkspaceFolders": [
".history"
],
}
}
I can confirm this
also what EmpireJones suggested worked for me as well.
Strangly it did not work for me.
It's Happening here.
Jest should runs only in store dir, but it runs in design and docs also.
I am using a monorepo workspace, this is the json of the workspace settings:
.vscode/workspace.code-workspace
{
"folders": [
{
"name": "✨ foo",
"path": ".."
},
{
"name": "📦 @foo/design",
"path": "../packages/design"
},
{
"name": "📦 @foo/docs",
"path": "../packages/docs"
},
{
"name": "📦 @foo/store",
"path": "../packages/store"
}
],
"settings": {
"jest.disabledWorkspaceFolders": [
"../packages/docs",
"../packages/design"
]
}
}
I tried variations of disabledWorkspaceFolders like packages/docs, /packages/docs and @foo/docs. None of them worked.
I found a workaround:
add a folder setting that disables jest automatic run on each folder of the multi-root workspace:
packages/{docs,design}/settings.json
{
"jest.autoEnable": false
}