fix(core-testing): address code review feedback for Task 1
- Remove unused @trpc/tanstack-react-query dependency - Document renderWithProviders tRPC provider omission (boundary constraint) - Implement deep merge in defineFactory (preserves nested sibling keys) - Document httpBatchLink<any> rationale in mock-trpc.ts - Align core-testing's own vitest.config with safety defaults (mockReset, unstubGlobals) - Add createMockTrpcClient usage example to AGENTS.md Reviewer: superpowers:code-reviewer (Task 1 of Plan 7). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,9 @@ export function createMockTrpcClient<TRouter extends AnyTRPCRouter>(
|
||||
return new Response(JSON.stringify([{ result: { data: superjson.serialize(result) } }]), { status: 200 });
|
||||
};
|
||||
|
||||
// httpBatchLink<TRouter> requires a conditional TransformerOptions<TRouter> that
|
||||
// depends on whether the router uses a transformer; making this generic-friendly
|
||||
// without parameterizing twice requires <any> here.
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const link = httpBatchLink<any>({
|
||||
url: "http://mock/api/trpc",
|
||||
|
||||
Reference in New Issue
Block a user