Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
fix(driver): add external commands only for JS binding (#28968)
Max Schmitt808359ba6c28
diff --git a/packages/playwright-core/src/cli/cli.ts b/packages/playwright-core/src/cli/cli.tsindex 7286f2f837..8681efe73a 100755--- a/packages/playwright-core/src/cli/cli.ts+++ b/packages/playwright-core/src/cli/cli.ts@@ -53,13 +53,18 @@ const kExternalPlaywrightTestCommands = [['show-report', 'Show Playwright Test HTML report.'],['merge-reports', 'Merge Playwright Test Blob reports'],];-for (const [command, description] of kExternalPlaywrightTestCommands) {- const playwrightTest = program.command(command).allowUnknownOption(true);- playwrightTest.description(`${description} Available in @playwright/test package.`);- playwrightTest.action(async () => {- printPlaywrightTestError(command);- gracefullyProcessExitDoNotHang(1);- });+function addExternalPlaywrightTestCommands() {+ for (const [command, description] of kExternalPlaywrightTestCommands) {+ const playwrightTest = program.command(command).allowUnknownOption(true);+ playwrightTest.description(`${description} Available in @playwright/test package.`);+ playwrightTest.action(async () => {+ printPlaywrightTestError(command);+ gracefullyProcessExitDoNotHang(1);+ });+ }}+if (!process.env.PW_LANG_NAME)+ addExternalPlaywrightTestCommands();+program.parse(process.argv);