vscode-mocha-test-adapter
vscode-mocha-test-adapter copied to clipboard
Tests inside of files with *.mjs and *.cjs extensions don't show up in test explorer pane
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.
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}"