I am getting this type error when I create a prism...
# orm-help
r
I am getting this type error when I create a prisma client mock using mockDeep. any suggestions on how this can be resolved. most of this is copy-paste from singleton unit test example on the docs.
Copy code
error TS2345: Argument of type '() => { __esModule: boolean; default: { $on: CalledWithMock<void, ["beforeExit", (event: () => Promise<void>) => void]>; $connect: CalledWithMock<Promise<void>, []>; ... 8 more ...; readonly prismaExampleTable: any; } & PrismaClient<...>; }' is not assignable to parameter of type 'MockModuleFactory<{ __esModule: boolean; default: { $on: CalledWithMock<void, ["beforeExit", (event: () => Promise<void>) => void]>; $connect: CalledWithMock<Promise<void>, []>; ... 8 more ...; readonly prismaExampleTable: any; } & PrismaClient<...>; }>'.
      Type '{ __esModule: boolean; default: { $on: CalledWithMock<void, ["beforeExit", (event: () => Promise<void>) => void]>; $connect: CalledWithMock<Promise<void>, []>; ... 8 more ...; readonly prismaExampleTable: any; } & PrismaClient<...>; }' is not assignable to type '{ __esModule: boolean; default: { $on: CalledWithMock<void, ["beforeExit", (event: () => Promise<void>) => void]>; $connect: CalledWithMock<Promise<void>, []>; ... 8 more ...; readonly prismaExampleTable: any; } & PrismaClient<...>; } & { ...; }'.
        Type '{ __esModule: boolean; default: { $on: CalledWithMock<void, ["beforeExit", (event: () => Promise<void>) => void]>; $connect: CalledWithMock<Promise<void>, []>; ... 8 more ...; readonly prismaExampleTable: any; } & PrismaClient<...>; }' is not assignable to type '{ __esModule: true; }'.
          Types of property '__esModule' are incompatible.
            Type 'boolean' is not assignable to type 'true'.
👀 1
a
Hey Rahul! It would be great if you could provide a small reproduction repo with the relevant bits of setup so I can try to recreate this.
r
let me try to put something together on a public repo.
@Austin here you go. you would have to update imports on your end. let me know if you need more informantion.
@Austin did you get a chance to look at this?
a
Thanks for the gists! However, I was unable to reproduce your error locally. Your best bet would be to fill out a bug report with complete information about your environment, versions, etc.