0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
router/e2e/react-start
Manuel Schiller 6ddaed9f70 feat(start): experimental Vitest support and typed test helpers
- With `tanstackStart()` in a config that Vitest loads, test files are
  compiled as the app's code is: for the client in browser mode, jsdom
  and happy-dom, for the server in Node. A test run sets up no dev
  server, preview server or build. A project needs no router entry and
  no routes. The route tree is generated once, and route files are never
  written.
- `mockServerFn` and `resetServerFnMocks` in `<framework>-start/testing`:
  in a client test a server function call goes to a mock that is typed
  from the function, in place of a request.
- `runInRequest`, `mockMiddleware` and `runMiddleware` in
  `<framework>-start/testing/server`: a server test runs server functions
  and middleware for a request it describes.
- Mocks end with the test that registered them. The plugin adds a setup
  file to every Vitest project for that.
- In a test run the server finds a server function by its id alone.
  Vitest serves compiled modules from its cache from the second run on,
  so the compiler has no record of them.
- In a test run Start names its packages in `resolve.noExternal` with
  regular expressions. Vitest's translation of the wildcards does not
  match a `-`, so jsdom and Node tests of an installed project ran
  `@tanstack/start-client-core` uncompiled.
- `@tanstack/react-start` pre-bundles `@tanstack/react-store` by a path
  that also resolves from a project that depends on Start only.
- `scripts/e2e/run-as-installed.mjs` runs an e2e project from a
  `pnpm deploy` copy, where `@tanstack/*` are in `node_modules` as in a
  user's project.
- `e2e/react-start/vitest-library` and `e2e/react-start/vitest-app` run
  their tests with an empty Vitest cache, from the warm cache and as an
  installed project.
- Docs: `docs/start/framework/react/guide/testing.md`.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
History 2026-11-15 17:10:33 +01:00
..
basic chore(deps): bump @rsbuild/core to 2.3.1 (#8890) 2026-11-08 10:47:24 +01:00
basic-auth response reconciliation (#7588) 2026-10-13 00:01:04 +02:00
basic-cloudflare docs(start): troubleshoot Cloudflare deployment config (#8396) 2026-11-05 21:26:13 -07:00
basic-react-query chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708) 2026-10-14 15:24:04 +02:00
basic-tsr-config chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708) 2026-10-14 15:24:04 +02:00
clerk-basic test(e2e): let Playwright manage application servers (#8357) 2026-09-14 10:54:23 +02:00
csp chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708) 2026-10-14 15:24:04 +02:00
css-inline chore(deps): bump @rsbuild/core to 2.3.1 (#8890) 2026-11-08 10:47:24 +01:00
css-modules fix(start-plugin-core): include CSS in Rsbuild dev SSR when the server runs in workerd (#8889) 2026-11-08 09:05:42 +01:00
custom-basepath chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708) 2026-10-14 15:24:04 +02:00
custom-server-rsbuild chore(deps): bump @rsbuild/core to 2.3.1 (#8890) 2026-11-08 10:47:24 +01:00
deferred-hydration chore(deps): bump @rsbuild/core to 2.3.1 (#8890) 2026-11-08 10:47:24 +01:00
dev-ssr-styles chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708) 2026-10-14 15:24:04 +02:00
early-hints perf: lower manifest script preload priority (#8212) 2026-10-16 15:35:33 +02:00
flamegraph-bench chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708) 2026-10-14 15:24:04 +02:00
hmr test(react-start): wait for SSR between HMR saves (#8913) 2026-11-09 12:57:45 +01:00
i18n-paraglide test: fix Nx sandbox violations in CI tasks (#8400) 2026-09-14 10:54:23 +02:00
import-protection chore(deps): bump @rsbuild/core to 2.3.1 (#8890) 2026-11-08 10:47:24 +01:00
import-protection-custom-config chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708) 2026-10-14 15:24:04 +02:00
issue-8049 test(e2e): let Playwright manage application servers (#8357) 2026-09-14 10:54:23 +02:00
query-integration test(e2e): let Playwright manage application servers (#8357) 2026-09-14 10:54:23 +02:00
response-reconciliation chore(deps): bump @rsbuild/core to 2.3.1 (#8890) 2026-11-08 10:47:24 +01:00
root-document-hydration chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708) 2026-10-14 15:24:04 +02:00
rsbuild chore(deps): bump @rsbuild/core to 2.3.1 (#8890) 2026-11-08 10:47:24 +01:00
rsc fix(react-start-rsc): bump RSC bundler deps for RSC (#8919) 2026-11-12 09:33:28 +01:00
rsc-deferred-hydration fix(react-start-rsc): bump RSC bundler deps for RSC (#8919) 2026-11-12 09:33:28 +01:00
rsc-query fix(react-start-rsc): bump RSC bundler deps for RSC (#8919) 2026-11-12 09:33:28 +01:00
rsc-rsbuild chore(deps): bump @rsbuild/core to 2.3.1 (#8890) 2026-11-08 10:47:24 +01:00
scroll-restoration chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708) 2026-10-14 15:24:04 +02:00
selective-ssr chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708) 2026-10-14 15:24:04 +02:00
serialization-adapters chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708) 2026-10-14 15:24:04 +02:00
server-functions chore(deps): bump @rsbuild/core to 2.3.1 (#8890) 2026-11-08 10:47:24 +01:00
server-functions-global-middleware chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708) 2026-10-14 15:24:04 +02:00
server-routes chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708) 2026-10-14 15:24:04 +02:00
server-routes-global-middleware chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708) 2026-10-14 15:24:04 +02:00
session-handling chore(deps): bump @rsbuild/core to 2.3.1 (#8890) 2026-11-08 10:47:24 +01:00
spa-mode test(e2e): let Playwright manage application servers (#8357) 2026-09-14 10:54:23 +02:00
split-base-and-basepath chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708) 2026-10-14 15:24:04 +02:00
start-manifest fix(start): preserve dev SSR CSS order (#7830) 2026-10-10 09:18:39 +02:00
static-server-functions fix(start): preserve dev SSR CSS order (#7830) 2026-10-10 09:18:39 +02:00
streaming-ssr chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708) 2026-10-14 15:24:04 +02:00
transform-asset-urls chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708) 2026-10-14 15:24:04 +02:00
virtual-routes chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708) 2026-10-14 15:24:04 +02:00
vitest-app feat(start): experimental Vitest support and typed test helpers 2026-11-15 17:10:33 +01:00
vitest-library feat(start): experimental Vitest support and typed test helpers 2026-11-15 17:10:33 +01:00
website chore(deps): bump srvx to ^1.0.0 and @vitejs/plugin-rsc to ^0.5.37 (#8708) 2026-10-14 15:24:04 +02:00