Skip to content

Commit

Permalink
test: don't throw errors in eachAsync in new test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Oct 15, 2019
1 parent ee15ea0 commit 0a98aa4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/runner/index.js
Expand Up @@ -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);
Expand Down

0 comments on commit 0a98aa4

Please sign in to comment.