mocha-sidebar
mocha-sidebar copied to clipboard
Requiring esm doesn't do anything
Description
It seems that requiring esm in the sidebar config doesn't do anything while it works fine from console. https://github.com/standard-things/esm
trying to searching for tests using these settings:
mocha path: mocha
test files location: ./esnext/**/*.spec.js
files to ignore: **/.git/**/*,**/node_modules/**/*
environmets: {}
requires: ["esm"]
options: {}
if you find anything wrong please change those default settings
____________________________________________________________________________
********/Cluster.spec.js:1
(function (exports, require, module, __filename, __dirname) { import { PlanarCluster } from "./Cluster.js";
^
Steps to Reproduce
- Install esm:
npm i --save esm - Paste into file with a test:
import * as path from "path";
- Run test through sidebar
Same example will run fine from console: mocha -r esm esnext/**/*.spec.js
Expected Results
Shouldn't crash
Actual Results
Crashes because requiring esm doesn't seem to do anything
Versions
- VScode: v1.28.0
- Mocha SideBar: v0.20.18
- Node Version: v8.9.3
OS version
- [x] Linux
- [x] Mac
- [x] Windows
Same here, did you find a workaround?
I create .babelrc like this
{
"presets": [
[
"@babel/preset-env",
{
"targets": "> 0.25%, not dead"
},
]
],
"exclude": "node_modules/**",
}
then the mocha-sidebar can work .
But when it paused on breakpoint , that line didn't highlighted, and debug-siderbar tell me that file was skipped by smartStep.
+1
+1