From 236e010d733c4477cfd3433b786ddbd4bed52c12 Mon Sep 17 00:00:00 2001 From: Jarda Snajdr Date: Wed, 1 Mar 2023 10:45:50 +0100 Subject: [PATCH] Add command to run performance tests in debug mode (#48614) --- package.json | 3 ++- packages/scripts/scripts/test-e2e.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 21c06ee4008167..37a38240c1e938 100644 --- a/package.json +++ b/package.json @@ -299,11 +299,12 @@ "test": "npm-run-all lint test:unit", "test:create-block": "bash ./bin/test-create-block.sh", "test:e2e": "wp-scripts test-e2e --config packages/e2e-tests/jest.config.js", - "test:e2e:debug": "wp-scripts --inspect-brk test-e2e --config packages/e2e-tests/jest.config.js --puppeteer-devtools", + "test:e2e:debug": "wp-scripts --inspect-brk test-e2e --runInBand --no-cache --verbose --config packages/e2e-tests/jest.config.js --puppeteer-devtools", "test:e2e:playwright": "playwright test --config test/e2e/playwright.config.ts", "test:e2e:storybook": "playwright test --config test/storybook-playwright/playwright.config.ts", "test:e2e:watch": "npm run test:e2e -- --watch", "test:performance": "wp-scripts test-e2e --config packages/e2e-tests/jest.performance.config.js", + "test:performance:debug": "wp-scripts --inspect-brk test-e2e --runInBand --no-cache --verbose --config packages/e2e-tests/jest.performance.config.js --puppeteer-devtools", "test:php": "npm-run-all lint:php test:unit:php", "test:php:watch": "wp-env run composer run-script test:watch", "test:unit": "wp-scripts test-unit-js --config test/unit/jest.config.js", diff --git a/packages/scripts/scripts/test-e2e.js b/packages/scripts/scripts/test-e2e.js index 67927038c7eeb8..330439ce2121b7 100644 --- a/packages/scripts/scripts/test-e2e.js +++ b/packages/scripts/scripts/test-e2e.js @@ -51,6 +51,7 @@ const config = configFile ? [ '--config', JSON.stringify( require( configFile ) ) ] : []; +// Force e2e tests to run serially, not in parallel. They test against a shared Docker instance const hasRunInBand = hasArgInCLI( '--runInBand' ) || hasArgInCLI( '-i' ); const runInBand = ! hasRunInBand ? [ '--runInBand' ] : [];