草庐IT

PersonalProjects

全部标签

node.js - Mocha 测试执行时间太长

所以我正在开发一个express.js应用程序,其中我有一个Mongoose模型用户。我编写了一个测试文件(使用Mocha)来测试save()函数,但我所有的测试执行时间太长,最终超时。这是我遇到的错误:Testing-Server-User-ModelTestingsave()1)shouldbeabletosavewithoutproblems2)shouldfailtosaveanexisitnguseragain3)shouldshouldanerrorwhentrytosavewithemptyemail4)shouldgiveanerrorwhentrytosavewith