Hello, I followed the following tutorial through: https://www.prisma.io/docs/guides/testing/unit-testing with Singleton approach, having replicated files with_singleton.ts, singleton.ts, functions-without-context.ts and followed the setup through. After npm run test, the following error is displayed:
FAIL __tests__/with_singleton.ts
● Test suite failed to run
__tests__/with_singleton.ts:29:44 - error TS2345: Argument of type '{ id: number; name: string; email: string; }' is not assignable to parameter of type 'User | Prisma__UserClient<User, never>'.
Property 'acceptTermsAndConditions' is missing in type '{ id: number; name: string; email: string; }' but required in type 'User'.
29 prismaMock.user.update.mockResolvedValue(user)
~~~~
node_modules/.prisma/client/index.d.ts:21:3
21 acceptTermsAndConditions: boolean
~~~~~~~~~~~~~~~~~~~~~~~~
'acceptTermsAndConditions' is declared here.
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 3.223 s
The document in question is https://github.com/prisma/docs/blob/main/content/300-guides/150-testing/100-unit-testing.mdx
Hello, I followed the following tutorial through: https://www.prisma.io/docs/guides/testing/unit-testing with Singleton approach, having replicated files
with_singleton.ts,singleton.ts,functions-without-context.tsand followed the setup through. Afternpm run test, the following error is displayed:The document in question is https://github.com/prisma/docs/blob/main/content/300-guides/150-testing/100-unit-testing.mdx