From 198c54da2d840cb0b997436b52b0db090179cbe1 Mon Sep 17 00:00:00 2001 From: Bret Comnes Date: Fri, 29 Sep 2023 13:42:04 -0700 Subject: [PATCH] Backport tapzero #19 https://github.com/socketsupply/tapzero/pull/19/files --- api/test/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/test/index.js b/api/test/index.js index 6f53075101..5f0b011ee4 100644 --- a/api/test/index.js +++ b/api/test/index.js @@ -821,11 +821,11 @@ export class Test { this.done = true - if (this._planned !== null && this._actual !== null) { - if (this._planned > this._actual) { + if (this._planned !== null) { + if (this._planned > (this._actual || 0)) { throw new Error(`Test ended before the planned number planned: ${this._planned} - actual: ${this._actual} + actual: ${this._actual || 0} ` ) }