我正在使用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)