test: update mocks for Prisma v7 stricter type checking

This commit is contained in:
2026-03-31 00:00:50 -07:00
parent 9649c62c28
commit 77de648200
4 changed files with 59 additions and 11 deletions
+5 -1
View File
@@ -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