嗨我运行我的测试时出现此错误我已阅读承诺并完成我仍然不确定将它放在我的测试中,还是最好在每个之前做一个保存重复?实现已完成的承诺的最佳方式是在哪里和什么?随机失败JS测试
错误:超过2000ms的超时。对于异步测试和挂钩,确保 “done()”被调用;如果返回Promise,请确保解决。
const chakram = require('chakram');
const expect = chakram.expect;
describe("Json assertions", function() {
it("Should return the matching test file and have a 200 response", function() {
let expected = require('../../test/fixtures/testfile.json');
let response = chakram.get("http://test");
expect(response).to.have.json(expected);
expect(response).to.have.status(200);
return chakram.wait();
});
});
那么,如果'http:// test'不可用?这个承诺会解决吗? – Bergi