vscode-mocha-test-adapter icon indicating copy to clipboard operation
vscode-mocha-test-adapter copied to clipboard

Tests inside of files with *.mjs and *.cjs extensions don't show up in test explorer pane

Open tkafka opened this issue 3 years ago • 1 comments

Due to "module format war", a convention of having classic modules in *.cjs files and ES6 modules in *.mjs files has appeared and all sorts of utilities around javascript are using it in order to be able to mix both (incompatible) module styles in one project.

However, vscode-mocha-test-adapter doesn't yet distinguish these files, and as a result, any test inside of files with mjs or cjs etxension will not show up in test explorer pane.

Proposed solution:

List all tests inside *.js, *.cjs and *.mjs files.

tkafka avatar Jun 29 '21 12:06 tkafka

I was able to fix the issue myself by editing the ./vscode/settings.json file and adding the correct path.

"mochaExplorer.files": "test/*-spec.{js,mjs}"

criticalmash avatar Nov 05 '22 19:11 criticalmash