1
我試圖運行一個承諾的測試,但測試失敗爭論超過超時限制,並建議確保我有完成子句。摩卡,nodejs承諾測試不能完成,因爲缺乏完成
這是我的測試代碼的一部分:
$configurations
.updateConfiguration(configurations_driver.NOT_VALID_MODEL) //invalid model
.then(function() {
done(new Error("Expected INVALID_MODEL error but got OK"));
}, function (error) {
chai.assert.isNotNull(error);
chai.expect(error.message).to.be.eq("INVALID_MODEL_ERROR");
chai.expect(error.kind).to.be.eq("ERROR_KIND");
chai.expect(error.path).to.be.eq("ERROR_PATH");
done();
})
.catch(done);
});
我都在那裏完成的條款,你可以看到,所以我不知道如果我錯過測試或結構的東西是錯的。