JGl*_*son 8 mocha.js istanbul nyc
我在一家@std/esm未获批准的公司工作。我的摩卡测试是这样工作的......
// 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
});
Run Code Online (Sandbox Code Playgroud)
但是当我运行时,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 | |
----------|----------|----------|----------|----------|-------------------|
Run Code Online (Sandbox Code Playgroud)
我忽略了其他测试,但它们确实导入了库。问题是我如何让它与纽约合作?
| 归档时间: |
|
| 查看次数: |
282 次 |
| 最近记录: |