diff --git a/test/sandbox-coverage.js b/test/sandbox-coverage.js index 1632f42..eed7544 100644 --- a/test/sandbox-coverage.js +++ b/test/sandbox-coverage.js @@ -13,3 +13,21 @@ sandbox.configure({ }, }, }); + +// polyfill for Node.js <12 +Promise.allSettled = + Promise.allSettled || + ((promises) => + Promise.all( + promises.map((p) => + p + .then((value) => ({ + status: 'fulfilled', + value, + })) + .catch((reason) => ({ + status: 'rejected', + reason, + })) + ) + ));