Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test-performance build script: Add build:packages/wp-env start scripts as dependency #22038

Open
strarsis opened this issue May 1, 2020 · 1 comment
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.

Comments

@strarsis
Copy link
Contributor

strarsis commented May 1, 2020

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:

  1. Check out Gutenberg (e.g. git clone https://github.com/WordPress/gutenberg)`
  2. Install the node modules/ensure node environment: nvm use && npm install
  3. 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.
  4. 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.

@strarsis strarsis changed the title test-performance build script: Add build:packages script as dependency test-performance build script: Add build:packages/wp-env start scripts as dependency May 1, 2020
@annezazu annezazu added the npm Packages Related to npm packages label May 6, 2020
@gziolo gziolo added 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. and removed npm Packages Related to npm packages labels May 9, 2020
@grappler
Copy link
Member

Came across the same issue. It might be good to just document the fix in the documentation until it is correctly fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

5 participants