fix: resolve TypeScript errors in test setup
This commit is contained in:
parent
f74d60c26b
commit
84664138ad
@ -125,7 +125,7 @@ function addIncludes(item: any, include: any): any {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Build mock Prisma client
|
// Build mock Prisma client
|
||||||
const mockPrismaClient = {
|
const mockPrismaClient: any = {
|
||||||
user: {
|
user: {
|
||||||
findUnique: jest.fn(async ({ where, include }: any) => {
|
findUnique: jest.fn(async ({ where, include }: any) => {
|
||||||
const user = findInArray(mockUsers, where);
|
const user = findInArray(mockUsers, where);
|
||||||
@ -280,7 +280,7 @@ const mockPrismaClient = {
|
|||||||
return cat;
|
return cat;
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
$transaction: jest.fn(async (operations: any) => {
|
$transaction: jest.fn(async (operations: any): Promise<any> => {
|
||||||
if (Array.isArray(operations)) {
|
if (Array.isArray(operations)) {
|
||||||
return Promise.all(operations);
|
return Promise.all(operations);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user