我正在使用Mocha进行一些测试.当我进入一组特定的测试时:
describe "Results Summaries",-> before (done) -> Testing.use("surveyplanet_test") Testing.initialUsers -> Testing.clearResultData -> done() beforeEach (done) -> Testing.redis.flushdb -> done() describe "Multiple Choice",-> describe "Standard Choice Selection",-> before (done) -> Testing.clearResultData -> Testing.loadQuestion "standardMC",-> Testing.loadExportData data: summarydata.standardMC onComplete: done describe "Pre-Summarization",-> before (done) -> answer_data = {} Testing.getMultipleTables tables: ["answers_main"] onComplete: (data) -> answer_data = data done()
它抛出错误:
Results Summaries
1) “before all” hook✖ 1 of 340 tests Failed:
1) Results Summaries “before all” hook:
Error: timeout of 2000ms exceeded
at Object. (/usr/local/lib/node_modules/mocha/lib/runnable.js:142:14)
at Timer.list.ontimeout (timers.js:101:19)
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。