0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
router/packages/solid-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
..
skills docs(skills): reference cross-package skills by intent ID (#8670) 2026-10-17 11:10:53 +02:00
src feat(start): experimental Vitest support and typed test helpers 2026-11-15 17:10:33 +01:00
tests chore(deps): upgrade Rsbuild to 2.2.5 (#8397) 2026-09-14 10:54:21 +02:00
CHANGELOG.md ci: Version Packages (#8891) 2026-11-08 10:47:39 +01:00
eslint.config.js SolidJS driver for TanStack Start (#3522) 2025-03-01 13:38:00 +01:00
package.json feat(start): experimental Vitest support and typed test helpers 2026-11-15 17:10:33 +01:00
README.md docs: use the dynamic README header endpoint (#7940) 2026-08-03 21:03:29 +02:00
tsconfig.build.json chore: upgrade tooling to typescript 6 (#7024) 2026-03-23 22:59:52 +01:00
tsconfig.json chore: upgrade tooling to typescript 6 (#7024) 2026-03-23 22:59:52 +01:00
tsconfig.server-entry.json fix build (#7550) 2026-06-04 23:45:39 +02:00
vite.config.server-entry.ts fix: add tsconfig.server-entry.json to fix missing declaration files … (#7035) 2026-03-25 22:37:24 +01:00
vite.config.ts feat(start): experimental Vitest support and typed test helpers 2026-11-15 17:10:33 +01:00

TanStack Solid Start

TanStack Solid Start

SSR, Streaming, Server Functions, API Routes, bundling and more powered by TanStack Router and Vite. Ready to deploy to your favorite hosting provider.

#TanStack semantic-release Join the discussion on Github Best of JS

Enjoy this library? Try the entire TanStack! Solid Query, Solid Table, Solid Virtual

Visit tanstack.com/start for docs, guides, API and more!