Closed eunchurnpark closed 2 years ago
I found createMockContext()
function return type is not MockContext
.
I made type
export type CreateMockContext = ReturnType<typeof createMockContext>;
and imported type to test codes
let mockCtx: CreateMockContext;
and fixed them.
First, I'm using
prisma
as Type ORM client withapollo-server-express
. My use case is context mock like belowcontext/contextMock.ts
myErrorTestCode.spec.ts
It was fine
jest-mock-extended@1.0.18
. after upgrate tojest-mock-extended@2.0.0
report type error not havingmockResolvedValue
How can I change use case in version 2?
Thank you.