vscode-jest activates for all folders in a multi-root workspace if any folder contains jest-related files

Created on 8 May 2020  路  1Comment  路  Source: jest-community/vscode-jest

vscode-jest activates for all roots in a multi-root workspace if any folder contains jest-related files. When it activates on folders that don't have jest files, it spams a bunch of error messages.

Expected Behavior

Don't show errors on roots where there are no jest files.

Actual Behavior

Shows errors on roots that don't use jest.

Screen Shot 2020-05-05 at 1 19 15 PM (1)

Workaround

It seems like only way to reduce scope would be to exhaustively list all folders where Jest should be disabled with jest.disabledWorkspaceFolders - there鈥檚 no way to specify a whitelist of folders where Jest should run (which would be better).

enhancement

>All comments

While this feature is definitely nice to have, it is the expected behavior for the current implementation: instead of doing a deep search for jest files on each folder, it took a simpler approach by providing a customize-option... As the error panel indicated above, you can skip these folders by adding "jest.disabledWorkspaceFolders": ['interviews', 'deploy-sourcegraph'] to .vscode/settings.json or the equivalent.

PR is welcome.

Was this page helpful?
0 / 5 - 0 ratings