Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yaogengzhu opened this issue Aug 10, 2023 · 0 comments
Open

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

yaogengzhu opened this issue Aug 10, 2023 · 0 comments

Comments

@yaogengzhu
Copy link
Owner

问题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"

解决地址

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant