run locally with source files
DEV=1 pnpx tsx path/to/bin/index.ts
cd examples/minimal-react/client && DEV=1 pnpx tsx ../../../packages/upgrade/src/bin/index.ts --force --skipTanstackQuery --verbose
or compiled
cd packages/upgrade
pnpm build && pnpm link .
pnpm link @trpc/upgrade && pnpm trpc-upgrade
Upgrade Testing 101
A test is a composite of up to 4 files:
myTest.tsx
defines a component to transform
myTest.snap.tsx
stores the output of the transform using standard vitest snapshot testing
myTest.trpc.tsx
(Optional) stores your trpc appRouter config and test server
myTest.spec.tsx
(Optional but recommended) a function which will test both the input and transformed components