Commit b37ddf9
committed
test(snapshots): migrate shim cases to the PTY snapshot suite
Migrate 7 of the 11 legacy `shim-*` global snap-test cases (node/npm/pnpm
shim behavior) to the PTY snapshot suite:
- shim-inherits-parent-{dev-engines-runtime,engines-node,node-version}
- shim-npm-uses-package-manager-version
- shim-npm-ignores-mismatched-package-manager
- shim-pnpm-uses-project-node-version
- shim-recursive-npm-run
The `test "$(npm --version)" = X` version assertions become direct
`npm`/`npx --version` steps whose pinned output is the snapshot; `npx` is
added to the runner program allow-list (resolved from the case PATH, so the
vp-managed shim wins).
Left in the legacy tree because they depend on shell features the PTY runner
intentionally does not provide: shim-corepack-bundled (corepack shim
resolution differs without the `vp remove -g corepack` isolation),
shim-corepack-enable-install-directory (fake runtime + `$(pwd)`/PATH
overrides), shim-npm-downloads-uncached-package-manager-version (`$VP_HOME`
path references + deliberate download path), shim-recursive-package-binary
(invokes an arbitrary installed binary).1 parent 576fd3b commit b37ddf9
44 files changed
Lines changed: 230 additions & 115 deletions
File tree
- crates/vite_cli_snapshots/tests/cli_snapshots
- fixtures
- shim_inherits_parent_dev_engines_runtime
- packages/app
- snapshots
- shim_inherits_parent_engines_node
- packages/app
- snapshots
- shim_inherits_parent_node_version
- packages/app
- snapshots
- shim_npm_ignores_mismatched_package_manager
- snapshots
- shim_npm_uses_package_manager_version
- snapshots
- shim_pnpm_uses_project_node_version
- snapshots
- shim_recursive_npm_run
- snapshots
- packages
- cli/snap-tests-global
- shim-inherits-parent-dev-engines-runtime
- shim-inherits-parent-engines-node
- shim-inherits-parent-node-version
- shim-npm-ignores-mismatched-package-manager
- shim-npm-uses-package-manager-version
- shim-pnpm-uses-project-node-version
- shim-recursive-npm-run
- tools/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 25 additions & 0 deletions
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 25 additions & 0 deletions
0 commit comments