daily-share icon indicating copy to clipboard operation
daily-share copied to clipboard

使用 mocha 的一些记录 (2023-8-10)

Open yaogengzhu opened this issue 1 year ago • 0 comments

问题1 : For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves

报错: Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. My test code is, I have the done call back but still getting the error to call the done();

解决方案:

  "test": "NODE_ENV=test mocha --timeout 100000 --harmony --reporter spec --require should */*.test.js"

解决地址

yaogengzhu avatar Aug 10 '23 01:08 yaogengzhu