test: update mocks for Prisma v7 stricter type checking
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* - Partnership performance
|
||||
*/
|
||||
|
||||
import { describe, test, expect, vi } from 'vitest';
|
||||
import { describe, test, expect, vi, beforeEach } from 'vitest';
|
||||
import { prisma } from '@/lib/prisma';
|
||||
import type { Player, Event, Match, PartnershipStat } from '@prisma/client';
|
||||
|
||||
@@ -56,6 +56,9 @@ const createMockTournament = (id: number, name: string): Event => ({
|
||||
ownerId: null,
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
event_id: null,
|
||||
targetScore: null,
|
||||
allowTies: false,
|
||||
});
|
||||
|
||||
// Helper to create mock match
|
||||
@@ -82,6 +85,7 @@ const createMockMatch = (
|
||||
createdById: null,
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
isCasual: false,
|
||||
});
|
||||
|
||||
// Helper to create mock partnership stat
|
||||
|
||||
Reference in New Issue
Block a user