我正在编写测试,但我不知道如何在特定的地方无法通过测试。我的代码说明:
Some promises
.waitUntil(() => isSynchronizationBusy(client).then(function(isBusy) {
if(isBusy.value.busy === false) {
if (isBusy.value.lastError !== null) {
//** in this place I want to failed a whole test case,
// but it have to failed a promise like when the timeout
// of waitUntil function occurrs **
}
return true;
}
}), 2 * 60 * 1000,'timeout occured while waiting for synchronization end')