(major: 7 | 8)
| 83 | } |
| 84 | |
| 85 | async function loadVite(major: 7 | 8): Promise<ViteLike> { |
| 86 | const url = new URL( |
| 87 | `./fixtures/vite-versions/node_modules/vite-v${major}/dist/node/index.js`, |
| 88 | import.meta.url |
| 89 | ); |
| 90 | return (await import(url.href)) as unknown as ViteLike; |
| 91 | } |
| 92 | |
| 93 | // Both cases share global state (process.cwd, the dist/ folder), so they |
| 94 | // must run sequentially — that is what vitest does inside a single describe. |