Open loynoir opened 3 years ago
https://github.com/loynoir/reproduce-karmaMocha-237.mjs
import
$ npm install $ npm test
Three tests
CJS ✔ bar fastESM ✔ bar slowESM ✔ bar SUMMARY: ✔ 3 tests completed
Missing unit test slowESM, but exit with code 0.
CJS ✔ bar fastESM ✔ bar SUMMARY: ✔ 2 tests completed
If top level await use <3ms, unit test seems OK. 🤔
https://github.com/loynoir/reproduce-karmaMocha-237.mjs/blob/master/test/fastESM.spec.mjs#L5
Repo
https://github.com/loynoir/reproduce-karmaMocha-237.mjs
Scenario
import
a slow ESM moduleReproduce
Expected
Three tests
Actual
Missing unit test slowESM, but exit with code 0.