Skip to content

Commit

Permalink
Add command to run performance tests in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnajdr committed Mar 1, 2023
1 parent 58809f8 commit 5631aa7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions packages/scripts/scripts/test-e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' ] : [];

Expand Down

0 comments on commit 5631aa7

Please sign in to comment.