diff --git a/package.json b/package.json index 1e0ae2be7c..128f19699f 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,6 @@ "core-js": "^3.16.3", "coveralls": "^3.1.1", "cross-env": "^7.0.2", - "cross-spawn": "^7.0.3", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-config-semistandard": "^16.0.0", diff --git a/test/integration/helpers.js b/test/integration/helpers.js index 5f338e6c2f..6f16bd72b6 100644 --- a/test/integration/helpers.js +++ b/test/integration/helpers.js @@ -297,7 +297,7 @@ function invokeNode(args, done, opts = {}) { * * @param {string[]} args - Path to executable and arguments * @param {RawResultCallback} done - Callback - * @param {Object|string} [opts] - Options to `cross-spawn` or `child_process.fork` or 'pipe' for shortcut to `{stdio: pipe}` + * @param {Object|string} [opts] - Options to `child_process` or 'pipe' for shortcut to `{stdio: pipe}` * @param {boolean} [opts.fork] - If `true`, use `child_process.fork` instead * @returns {import('child_process').ChildProcess} */ @@ -334,7 +334,7 @@ function createSubprocess(args, done, opts = {}) { debug('forking: %s', args.join(' ')); mocha = fork(args[0], args.slice(1), opts); } else { - const {spawn} = require('cross-spawn'); + const {spawn} = require('child_process'); debug('spawning: %s', [process.execPath].concat(args).join(' ')); mocha = spawn(process.execPath, args, opts); } @@ -400,11 +400,11 @@ function getSummary(res) { * and waits until the second test run has been completed. Mocha is * killed and the result is returned. * - * On Windows, this will call `child_process.fork()` instead of `cross-spawn.spawn()`. + * On Windows, this will call `child_process.fork()` instead of `spawn()`. * * **Exit code will always be 0** * @param {string[]} args - Array of argument strings - * @param {object|string} opts - If a `string`, then `cwd`, otherwise options for `cross-spawn.spawn` or `child_process.fork` + * @param {object|string} opts - If a `string`, then `cwd`, otherwise options for `child_process` * @param {Function} change - A potentially `Promise`-returning callback to execute which will change a watched file * @returns {Promise} */ @@ -451,11 +451,11 @@ async function runMochaWatchAsync(args, opts, change) { * and waits until the second test run has been completed. Mocha is * killed and the result is returned. * - * On Windows, this will call `child_process.fork()` instead of `cross-spawn.spawn()`. + * On Windows, this will call `child_process.fork()` instead of `spawn()`. * * **Exit code will always be 0** * @param {string[]} args - Array of argument strings - * @param {object|string} opts - If a `string`, then `cwd`, otherwise options for `cross-spawn.spawn` or `child_process.fork` + * @param {object|string} opts - If a `string`, then `cwd`, otherwise options for `child_process` * @param {Function} change - A potentially `Promise`-returning callback to execute which will change a watched file * @returns {Promise} */