Let's use mocha --dry-run
to discover tests and remove esbuild
#172
Replies: 1 comment 1 reply
-
I rather see negative points in changing (fully) to such a discovery mode.
I remember problems with using
I don't agree with this simplification of what this extension does. This extension aims to be a full integration of Mocha into VSCode. This goes beyond just running mocha. Mocha is lacking of good (and lightweight) interfaces to load tests with the required metadata. The problem already starts with mapping the exact locations of tests in the source code. There is no information about the lines in which a test is placed breaking all functionality to jump to the tests from the test explorer and results.
Assuming we discover tests through other means, we still need some level of source mapping. Mocha does not provide a semantic result on where an error happened. Currently the Bugs with integrations can always happen and this extension is young, but as tooling evolves there will always be challenges unless standards are defined. We have tsx, ts-node and also Node added basic type annotation support lately.
As mentioned above, some complexities remain or are only shifted. We still need certain integration points with mocha that go further. I am not saying If you are eager to give it a try, you can horizontally extend the discoverer options and add a mocha-vscode/src/discoverer/settings.ts Lines 35 to 48 in 6bf7656 |
Beta Was this translation helpful? Give feedback.
-
Let's use
mocha --dry-run
to discover tests and remove esbuildReasons:
Beta Was this translation helpful? Give feedback.
All reactions