Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

test: forward NODE_OPTIONS to remote server child processes (#40653)

Yury Semikhatsky6eab8a3c2bae
diff --git a/tests/config/remoteServer.ts b/tests/config/remoteServer.ts
index c2989da4fd..b541628da0 100644
--- a/tests/config/remoteServer.ts
+++ b/tests/config/remoteServer.ts
@@ -15,7 +15,6 @@
*/
import path from 'path';
-import { inheritAndCleanEnv } from './utils';
import type { BrowserType, Browser } from 'playwright-core';
import type { CommonFixtures, TestChildProcess } from './commonFixtures';
@@ -36,7 +35,7 @@ export class RunServer implements PlaywrightServer {
command.push(`--artifacts-dir=${options.artifactsDir}`);
this._process = childProcess({
command,
- env: inheritAndCleanEnv(options?.env),
+ env: { NODE_OPTIONS: process.env.NODE_OPTIONS, ...options?.env },
});
let wsEndpointCallback: (value: string) => void;
@@ -108,6 +107,7 @@ export class RemoteServer implements PlaywrightServer {
};
this._process = childProcess({
command: ['node', path.join(__dirname, 'remote-server-impl.js'), JSON.stringify(options)],
+ env: { NODE_OPTIONS: process.env.NODE_OPTIONS },
});
let index = 0;