Я работаю в компании, где @std/esm
не было утверждено.Мой тест Mocha работает так:
// suite.js
async function wire(){
await import("./Sanity.spec.mjs"); // eslint-disable-line
run();
}
wire();
//Sanity.spec.mjs
import chai from "chai"
describe("My Test", ()=>{
it("Should do what I want", ()=>chai.assert.equal(1,1, "One is in fact 1")); // eslint-disable-line no-self-compare
});
Но когда я запускаю как nyc mocha --delay --exit ./test/suite.js
, я вижу, что тесты mocha выполняются, но результаты покрытия кода пусты.
My Test
√ Should do what I want
When using base App
info: Healthcheck server is listening on 420
√ App should not be null
√ The port should be correct
3 passing (24ms)
----------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files | 0 | 0 | 0 | 0 | |
----------|----------|----------|----------|----------|-------------------|
Я пропустил другие тесты, но они импортируют библиотеки.Вопрос в том, как заставить это работать с Нью-Йорком?