test-performance build script: Add build:packages/wp-env start scripts as dependency #22038
Labels
Needs Technical Feedback
Needs testing from a developer perspective.
[Type] Automated Testing
Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
[Type] Enhancement
A suggestion for improvement.
Describe the bug
Just running the
test-performance
script (npm run test-performance
) on a cleanly checked out worktree won't work as jest fails to find the monorepo modules in./packages
.This can be easily solved by running the
build:packages
andwp-env start
scripts to have the monorepo modules all built and loadable by jest.To reproduce
Steps to reproduce the behavior:
git clone https://github.com/WordPress/gutenberg
)`nvm use && npm install
test-performance
script:npm run test-performance
. Notice that jest fails to start the testing because it cannot find packages in the monorepo.build:packages
(npm run build:packages
) andwp-env start
(npm run wp-env start
) scripts. After successful packages build, run thetest-performance
script again and notice that the jest loading issue is now fixed.Expected behavior
When a npm package script is invoked, all scripts on which output/state modifications/installing the invoked script depends on, should run first.
The text was updated successfully, but these errors were encountered: