Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/internal/main/test_runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ if (isUsingInspector() && options.isolation === 'process') {
}

options.globPatterns = ArrayPrototypeSlice(process.argv, 1);
options.cwd = process.cwd();
options.execArgv = process.execArgv;

debug('test runner configuration:', options);
run(options).on('test:summary', (data) => {
Expand Down
4 changes: 2 additions & 2 deletions lib/internal/test_runner/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ function getRunArgs(path, { forceExit,
*/
const nodeOptionsSet = new SafeSet(processNodeOptions);
const unknownProcessExecArgv = ArrayPrototypeFilter(
process.execArgv,
execArgv,
(arg, i, arr) => !nodeOptionsSet.has(arg) && filterExecArgv(arg, i, arr),
);
ArrayPrototypePushApply(runArgs, unknownProcessExecArgv);
Expand Down Expand Up @@ -730,7 +730,7 @@ function run(options = kEmptyObject) {
randomSeed: suppliedRandomSeed,
execArgv = [],
argv = [],
cwd = process.cwd(),
cwd = '.',
rerunFailuresFilePath,
env,
} = options;
Expand Down
4 changes: 4 additions & 0 deletions src/process_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ class ProcessWrap : public HandleWrap {
if (!stdios->Get(context, i).ToLocal(&val)) {
return Nothing<void>();
}
if (!val->IsObject()) {
env->ThrowTypeError("stdio must be an object");
return Nothing<void>();
}
Local<Object> stdio = val.As<Object>();
Local<Value> type;
if (!stdio->Get(context, env->type_string()).ToLocal(&type)) {
Expand Down
Loading