一个基本的测试是验证mongo集合中的一些设置(名称设置)--我们正在使用Mocha、We、Require和超级测试在测试之前(函数(完成){ //在我们的测试中使用test db mongoose.connect(config.db);done();});描述(‘必需的配置',函数(){它(应该返回设置对象mongoose.Setting.findOne({key:'ABC'},函数(Found
我正在尝试测试async函数是否会抛出异常,但我一直收到这个错误: AssertionError: expected [Function] to throw an error 我正在使用Mocha和Chaiit('Throw an error', async () => { await retrieveException();}, Error);
c