这是indexloc提供的服务,不要输入任何密码
Skip to content

Add e2e tests for turbo prune #553

@jaredpalmer

Description

@jaredpalmer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions