Patch to use this.timeout() > 0 rather than this.enableTimeout() to work with mocha 8+

This commit is contained in:
Wesley Wigham
2020-06-10 14:26:22 -07:00
parent 338e42fabe
commit c88ed727de

View File

@@ -41,7 +41,7 @@ namespace Harness.Parallel.Worker {
return class extends (base as typeof Mocha.Runnable) {
resetTimeout() {
this.clearTimeout();
if (this.enableTimeouts()) {
if (this.timeout() > 0) {
sendMessage({ type: "timeout", payload: { duration: this.timeout() || 1e9 } });
this.timer = true;
}