Skip to content

refactor(tests): import test globals from vite-plus/test - #2759

Open
shulaoda wants to merge 4 commits into
cloudflare:mainfrom
shulaoda:refactor/use-vite-plus-test
Open

refactor(tests): import test globals from vite-plus/test#2759
shulaoda wants to merge 4 commits into
cloudflare:mainfrom
shulaoda:refactor/use-vite-plus-test

Conversation

@shulaoda

@shulaoda shulaoda commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #2748. Rewrites the last six test files that still imported test globals from vitest to import them from vite-plus/test, matching the convention already used by the rest of the suite.

  • tests/benchmark-chart.test.ts
  • tests/compatibility-support.test.ts
  • tests/http-conditional.test.ts
  • tests/http-date.test.ts
  • tests/http-range.test.ts
  • tests/next-response.test.ts

There are now no remaining from "vitest" imports outside node_modules. Also adds this principle to AGENTS.md and enforces it via a lint rule.

Notes

vitest stays in package.json only to satisfy @vitest/coverage-istanbul's peer dependency, not because anything imports it. Might be worth an upstream issue on vite-plus or vitest.

@pkg-pr-new

pkg-pr-new Bot commented Jul 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@vinext/cloudflare@2759
npm i https://pkg.pr.new/create-vinext-app@2759
npm i https://pkg.pr.new/@vinext/types@2759
npm i https://pkg.pr.new/vinext@2759

commit: fd3f80b

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared b193857 against base cf689f2 using alternating same-runner rounds. Next.js was unchanged and skipped.

1 improved · 0 regressed · 5 within ±1.5%

Scenario Framework Baseline Current Change
Client bundle size (gzip) vinext 134.6 KB 134.6 KB ⚫ +0.0%
Client entry size (gzip) vinext 122.1 KB 122.1 KB ⚫ +0.0%
Dev server cold start vinext 2.89 s 2.81 s 🟢 -2.6%
Production build time vinext 3.16 s 3.18 s ⚫ +0.5%
RSC entry closure size (gzip) vinext 113.8 KB 113.8 KB ⚫ +0.0%
Server bundle size (gzip) vinext 191.3 KB 191.3 KB ⚫ +0.0%

View detailed results and traces

🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head

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 this pull request may close these issues.

1 participant