Skip to content

Commit d77b85d

Browse files
committed
test(snapshots): migrate vite-* cases to the PTY snapshot suite
Migrates the 11 `vite-*` cases (vite plugin factory loading, config task, task-path env) from `packages/cli/snap-tests` to the PTY snapshot suite, and removes the legacy dirs. The 5 `vite-plugins-*` build cases asserted a built marker via a `cat dist/index.html | grep '<marker>'` shell pipe the migrator cannot translate; hand-converted to `vpt grep-file dist/index.html <marker>`. Adds a redaction rule for vitest's nondeterministic `Start at HH:MM:SS` wall-clock line, needed by vite_plugins_async_test. Part of #2116.
1 parent 2778262 commit d77b85d

87 files changed

Lines changed: 219 additions & 125 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/cli/snap-tests/vite-config-task/package.json renamed to crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/vite_config_task/package.json

File renamed without changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[[case]]
2+
name = "vite_config_task"
3+
vp = "local"
4+
steps = [
5+
{ argv = ["vp", "run", "build"], continue-on-failure = true },
6+
]

packages/cli/snap-tests/vite-config-task/snap.txt renamed to crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/vite_config_task/snapshots/vite_config_task.md

Lines changed: 6 additions & 3 deletions

packages/cli/snap-tests/vite-config-task/vite.config.ts renamed to crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/vite_config_task/vite.config.ts

File renamed without changes.

packages/cli/snap-tests/vite-plugins-async/index.html renamed to crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/vite_plugins_async/index.html

File renamed without changes.

packages/cli/snap-tests/vite-plugins-async/my-plugin.ts renamed to crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/vite_plugins_async/my-plugin.ts

File renamed without changes.

packages/cli/snap-tests/vite-plugins-async/package.json renamed to crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/vite_plugins_async/package.json

File renamed without changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[[case]]
2+
name = "vite_plugins_async"
3+
vp = "local"
4+
steps = [
5+
{ argv = ["vp", "build"], snapshot = false, continue-on-failure = true },
6+
{ argv = ["vpt", "grep-file", "dist/index.html", "lazy-plugin-injected"], comment = "async vitePlugins() should apply plugins during build" },
7+
]
Lines changed: 12 additions & 0 deletions

packages/cli/snap-tests/vite-plugins-async/vite.config.ts renamed to crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/vite_plugins_async/vite.config.ts

File renamed without changes.

0 commit comments

Comments
 (0)