# Testing signals — trpc/trpc

> Canonical page: https://codevetter.com/unpack/trpc/testing-signals

# Testing signals — trpc/trpc

Scanned commit 8b649ad874a8fe97c73962d4617912231b975736 (2026-09-17). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

Unit and integration tests are Vitest projects rooted at every packages/* package, with jsdom, globals, Istanbul coverage, and two CI retries. The heaviest behavioral coverage is packages/tests/server (adapters, batching, streaming, websockets, regressions) plus colocated tests in server, client, and react-query. Playwright smoke tests live in selected examples and run in a GitHub Actions matrix that is allowed to fail. OpenAPI fixture drift fails the unit job. App-dir, upgrade, vendor, www, and examples are excluded from coverage.
- Root test script is vitest. vitest.shared.ts sets environment jsdom, globals, setupFiles packages/tests/suppressActWarnings.ts, coverage provider istanbul including **/src/**, restoreMocks, execArgv --expose-gc, and retry 2 when CI is set. — [package.json#L18](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/package.json#L18) [vitest.shared.ts#L39-L67](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/vitest.shared.ts#L39-L67) [vitest.config.ts#L4-L9](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/vitest.config.ts#L4-L9)
- Coverage excludes www, examples, packages/next/src/app-dir, packages/server/src/adapters/next-app-dir, packages/upgrade/src, and vendor. codecov.yml sets project target auto with a 1% threshold, turns patch status off, ignores deprecated, form-data, app-dir, openapi cli.ts, and openapi test routers, and disables PR comments. — [vitest.shared.ts#L48-L62](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/vitest.shared.ts#L48-L62) [codecov.yml#L1-L21](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/codecov.yml#L1-L21)
- packages/tests is the integration package described in CONTRIBUTING. Its server suite includes batching.test.ts, streaming.test.ts, websockets.test.ts, middlewares.test.ts, caller.test.ts, adapters/, and a regression/ directory. React act warnings are muted in CI via MUTE_REACT_ACT_WARNINGS=1. — [CONTRIBUTING.md#L31-L51](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/CONTRIBUTING.md#L31-L51) [.github/workflows/main.yml#L66-L81](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/.github/workflows/main.yml#L66-L81)
- @trpc/react-query colocates dozens of hook tests under packages/react-query/test, including useQuery, useMutation, useInfiniteQuery, useSubscription, suspense variants, ssr/ssg, formData, and a regression/ folder. @trpc/tanstack-react-query tests options proxies under packages/tanstack-react-query/test. — [packages/react-query/package.json#L1-L5](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/react-query/package.json#L1-L5) [packages/tanstack-react-query/package.json#L2-L6](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/tanstack-react-query/package.json#L2-L6)
- The unit-test CI job runs pnpm test --coverage and then fails if git status shows changes under packages/openapi/test/routers, telling contributors to run pnpm -C packages/openapi codegen. Codecov upload uses codecov-action@v6 and only passes CODECOV_TOKEN for non-fork PRs. — [.github/workflows/main.yml#L81-L99](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/.github/workflows/main.yml#L81-L99)
- Playwright is the e2e runner for examples that have playwright.config.ts. examples/minimal-react/test/smoke.test.ts loads / and waits for text=tRPC user with a 35s timeout. The e2e job runs, per example, test-dev, build, typecheck, and test-start via turbo, after copying .env.example to .env. — [examples/minimal-react/test/smoke.test.ts#L1-L8](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/examples/minimal-react/test/smoke.test.ts#L1-L8) [.github/workflows/main.yml#L101-L158](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/.github/workflows/main.yml#L101-L158)
- The e2e matrix covers .experimental/next-app-dir, diagnostics-big-router, internal-types-export, ssg, cloudflare-workers, express-minimal, express-server, fastify-server, minimal-react, next-formdata, next-minimal-starter, next-prisma-starter, next-prisma-todomvc, next-prisma-websockets-starter, openapi-codegen, soa, standalone-server, vercel-edge-runtime, and nuxt. next-sse-chat is commented out. The job sets continue-on-error true. — [.github/workflows/main.yml#L101-L158](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/.github/workflows/main.yml#L101-L158)
- E2E Postgres is a GitHub service container with POSTGRES_HOST_AUTH_METHOD trust and user postgres. NEXTAUTH_SECRET is set to the literal supersecret in that job's env. Separate jobs e2e-deno (deno-deploy) and e2e-bun exist; both are also PR-only. — [.github/workflows/main.yml#L106-L118](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/.github/workflows/main.yml#L106-L118) [.github/workflows/main.yml#L160-L199](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/.github/workflows/main.yml#L160-L199)
- Build and typecheck jobs run only on pull_request, not on push. The test job runs on both. Concurrency cancels in-progress runs for the same ref. Turbo remote cache uses secrets TURBO_TOKEN and vars TURBO_TEAM. — [.github/workflows/main.yml#L1-L47](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/.github/workflows/main.yml#L1-L47) [.github/workflows/main.yml#L66-L71](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/.github/workflows/main.yml#L66-L71)
- examples/next-prisma-starter has both a Vitest test at src/server/routers/post.test.ts and Playwright at playwright/smoke.test.ts. Its CI path is included in the e2e matrix, so the example is part of the PR gate even though example sources are excluded from Istanbul coverage. — [.github/workflows/main.yml#L136-L137](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/.github/workflows/main.yml#L136-L137) [vitest.shared.ts#L52-L54](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/vitest.shared.ts#L52-L54)
- Server package colocates tests such as procedureBuilder.test.ts, router.test.ts, initTRPC.test.ts, sse.test.ts, and adapters/node-http/incomingMessageToRequest.test.ts, including a case titled POST with body and maxBodySize. Client colocates createChain.test.ts, dedupeLink.test.ts, splitLink.test.ts, and localLink.test.ts. — [packages/server/src/adapters/node-http/incomingMessageToRequest.test.ts#L130-L131](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/server/src/adapters/node-http/incomingMessageToRequest.test.ts#L130-L131) [packages/client/src/links/splitLink.test.ts](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/client/src/links/splitLink.test.ts)
- @trpc/upgrade tests live in packages/upgrade/test with fixture TSX files and transforms.test.ts, but upgrade/src is excluded from coverage, so the CLI's git and package-manager side effects are not in the Codecov gate. — [packages/upgrade/package.json#L1-L8](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/upgrade/package.json#L1-L8) [vitest.shared.ts#L57-L60](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/vitest.shared.ts#L57-L60)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
