From 76142a33ae91bdb94c6e2b6aa3cf2d0a53c0ce09 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Mon, 11 Oct 2021 21:07:40 +0200 Subject: [PATCH] test: fix tests which include special signal handling (#9433) --- tests/playwright-test/playwright-test-fixtures.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/playwright-test/playwright-test-fixtures.ts b/tests/playwright-test/playwright-test-fixtures.ts index a7bb07a8e4..9b9f3ab293 100644 --- a/tests/playwright-test/playwright-test-fixtures.ts +++ b/tests/playwright-test/playwright-test-fixtures.ts @@ -90,6 +90,8 @@ async function writeFiles(testInfo: TestInfo, files: Files) { return baseDir; } +const cliEntrypoint = path.join(__dirname, '../../packages/playwright-core/cli.js'); + async function runPlaywrightTest(childProcess: CommonFixtures['childProcess'], baseDir: string, params: any, env: Env, options: RunOptions): Promise { const paramList = []; for (const key of Object.keys(params)) { @@ -100,7 +102,7 @@ async function runPlaywrightTest(childProcess: CommonFixtures['childProcess'], b } const outputDir = path.join(baseDir, 'test-results'); const reportFile = path.join(outputDir, 'report.json'); - const args = ['npx', 'playwright', 'test']; + const args = ['node', cliEntrypoint, 'test']; if (!options.usesCustomOutputDir) args.push('--output=' + outputDir); args.push(