Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

chore: use standard 'Promise.allSettled' instead of polyfill (#4905)

Outsider77c18d29c565
diff --git a/lib/nodejs/parallel-buffered-runner.js b/lib/nodejs/parallel-buffered-runner.js
index 3f882ba2..6052efc0 100644
--- a/lib/nodejs/parallel-buffered-runner.js
+++ b/lib/nodejs/parallel-buffered-runner.js
@@ -6,7 +6,6 @@
'use strict';
-const allSettled = require('@ungap/promise-all-settled').bind(Promise);
const Runner = require('../runner');
const {EVENT_RUN_BEGIN, EVENT_RUN_END} = Runner.constants;
const debug = require('debug')('mocha:parallel:parallel-buffered-runner');
@@ -322,7 +321,7 @@ class ParallelBufferedRunner extends Runner {
delete options[opt];
});
- const results = await allSettled(
+ const results = await Promise.allSettled(
files.map(this._createFileRunner(pool, options))
);
diff --git a/package-lock.json b/package-lock.json
index d144e6a2..b2acc6f5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,7 +9,6 @@
"version": "10.0.0",
"license": "MIT",
"dependencies": {
- "@ungap/promise-all-settled": "1.1.2",
"ansi-colors": "4.1.1",
"browser-stdout": "1.3.1",
"chokidar": "3.5.3",
@@ -1577,11 +1576,6 @@
"@types/node": "*"
}
},
- "node_modules/@ungap/promise-all-settled": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz",
- "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q=="
- },
"node_modules/@wdio/config": {
"version": "6.12.1",
"resolved": "https://registry.npmjs.org/@wdio/config/-/config-6.12.1.tgz",
@@ -25665,11 +25659,6 @@
"@types/node": "*"
}
},
- "@ungap/promise-all-settled": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz",
- "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q=="
- },
"@wdio/config": {
"version": "6.12.1",
"resolved": "https://registry.npmjs.org/@wdio/config/-/config-6.12.1.tgz",
diff --git a/package.json b/package.json
index aba2b8f1..22eeff7f 100644
--- a/package.json
+++ b/package.json
@@ -54,7 +54,6 @@
"test:smoke": "node ./bin/mocha --no-config test/smoke/smoke.spec.js"
},
"dependencies": {
- "@ungap/promise-all-settled": "1.1.2",
"ansi-colors": "4.1.1",
"browser-stdout": "1.3.1",
"chokidar": "3.5.3",