0
我正在運行此測試(簡化),其失敗如預期...但儘管失敗,它仍然等待完整的20秒超時。我如何讓它立即失敗?摩卡/夢魘測試失敗,但仍然等待超時
it("should fail before timeout", function (done) {
var nightmare = new Nightmare({ show: true })
.goto(url)
.evaluate(function() {
})
.then(function (result) {
// this point is reached, and then the test just waits
// 20 seconds before finally failing
throw "Fail"
})
})