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

Add e2e tests for turbo prune #553

Closed
jaredpalmer opened this issue Jan 13, 2022 · 0 comments · Fixed by #633
Closed

Add e2e tests for turbo prune #553

jaredpalmer opened this issue Jan 13, 2022 · 0 comments · Fixed by #633

Comments

@jaredpalmer
Copy link
Contributor

jaredpalmer commented Jan 13, 2022

Describe the feature you'd like to request

Add e2e tests for turbo prune --scope=<app> and turbo prune --scope=<app> --docker to https://github.com/vercel/turborepo/blob/main/cli/scripts/e2e/e2e.ts#L181

Describe the solution you'd like

  • Add e2e tests for turbo prune --scope=<app>
    • It should assert that the generated lockfile only contains correct dependencies (from packages, deps, and the root), you can verify this in node.js in the test with https://github.com/yarnpkg/yarn/tree/master/packages/lockfile
    • It should assert that yarn install --frozen-lockfile works in the out directory
    • It should assert that turbo run works when run in the out directory
  • Add e2e tests for turbo prune --scope=<app> --docker
    • It should assert correct folder structure
    • It should build a dockerfile that includes turbo prune --scope=<app> --docker, correct copy behavior, yarn install, and then turbo run build.
      • After the first docker build, it should change a dependency that doesn't impact the desired target or its deps, and re-run the docker build. It should be instant (no need to re-install)
      • It should change a dependency and verify that re-install and rebuild is indeed is necessary
  • Make necessary changes to .devcontainer so that the tests can run (it may already be possible with docker in docker)
  • Bonus points:
    • Write these tests with stubs for when we add support for prune for package managers

Describe alternatives you've considered

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant