daily-share
daily-share copied to clipboard
使用 mocha 的一些记录 (2023-8-10)
问题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"