Skip to content

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

test: fix Node.js deprecation warning DEP0190 in primary tests (#36577)

Max Schmittebd74e9ee8e0
diff --git a/tests/config/commonFixtures.ts b/tests/config/commonFixtures.ts
index 57f1d76373..e28feed7b2 100644
--- a/tests/config/commonFixtures.ts
+++ b/tests/config/commonFixtures.ts
@@ -107,7 +107,10 @@ export class TestChildProcess {
constructor(params: TestChildParams) {
this.params = params;
- this.process = spawn(params.command[0], params.command.slice(1), {
+ // See https://nodejs.org/api/deprecations.html#DEP0190
+ const command = params.shell ? params.command.join(' ') : params.command[0];
+ const args = params.shell ? [] : params.command.slice(1);
+ this.process = spawn(command, args, {
env: {
...process.env,
...params.env,