From 0a98aa493ab9c8814cc08649432ff71553692100 Mon Sep 17 00:00:00 2001 From: Matt Broadstone Date: Tue, 15 Oct 2019 17:33:51 -0400 Subject: [PATCH] test: don't throw errors in `eachAsync` in new test runner --- test/runner/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/runner/index.js b/test/runner/index.js index a44f25d3be..1c9ae8e5c6 100644 --- a/test/runner/index.js +++ b/test/runner/index.js @@ -26,11 +26,13 @@ function initializeFilters(client, callback) { const filter = new FilterModule(); if (typeof filter !== 'object') { - throw new TypeError('Type of filter must be an object'); + cb(new TypeError('Type of filter must be an object')); + return; } if (!filter.filter || typeof filter.filter !== 'function') { - throw new TypeError('Object filters must have a function named filter'); + cb(new TypeError('Object filters must have a function named filter')); + return; } filters.push(filter);