我和詹金斯有个奇怪的错误。
当我运行localy测试时一切正常。但如果我在Jenkins上运行测试,我总会收到错误:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
我之前的步骤:
before(function () {
return chakram.get(`{baseUrl}/api/cats`)
.then(apiResp => {
return getCats= apiResp;
})
})