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 and wp-env start scripts to have the monorepo modules all built and loadable by jest.
To reproduce
Steps to reproduce the behavior:
Check out Gutenberg (e.g. git clone https://github.com/WordPress/gutenberg)`
Install the node modules/ensure node environment: nvm use && npm install
Run the test-performance script: npm run test-performance. Notice that jest fails to start the testing because it cannot find packages in the monorepo.
As fix, run the build:packages (npm run build:packages) and wp-env start (npm run wp-env start) scripts. After successful packages build, run the test-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.
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 thebuild: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.