mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
test_runner: avoid spread operator on arrays
PR-URL: https://github.com/nodejs/node/pull/55143 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
@@ -158,7 +158,8 @@ function getRunArgs(path, { forceExit,
|
||||
ArrayPrototypePushApply(argv, execArgv);
|
||||
|
||||
if (path === kIsolatedProcessName) {
|
||||
ArrayPrototypePush(argv, '--test', ...ArrayPrototypeSlice(process.argv, 1));
|
||||
ArrayPrototypePush(argv, '--test');
|
||||
ArrayPrototypePushApply(argv, ArrayPrototypeSlice(process.argv, 1));
|
||||
} else {
|
||||
ArrayPrototypePush(argv, path);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ const {
|
||||
ArrayPrototypeSome,
|
||||
ArrayPrototypeSplice,
|
||||
ArrayPrototypeUnshift,
|
||||
ArrayPrototypeUnshiftApply,
|
||||
FunctionPrototype,
|
||||
MathMax,
|
||||
Number,
|
||||
@@ -735,9 +736,9 @@ class Test extends AsyncResource {
|
||||
|
||||
computeInheritedHooks() {
|
||||
if (this.parent.hooks.beforeEach.length > 0) {
|
||||
ArrayPrototypeUnshift(
|
||||
ArrayPrototypeUnshiftApply(
|
||||
this.hooks.beforeEach,
|
||||
...ArrayPrototypeSlice(this.parent.hooks.beforeEach),
|
||||
ArrayPrototypeSlice(this.parent.hooks.beforeEach),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user