chore: fix linting errors in tests and api routes

This commit is contained in:
2026-03-30 22:58:33 -07:00
parent 6f83080fca
commit b0aaffbecf
4 changed files with 9 additions and 8 deletions
@@ -13,7 +13,7 @@ const prisma = new PrismaClient();
test.describe('CSV Upload Player Deduplication', () => {
let testTournamentId: number;
let testPlayerIds: number[] = [];
const testPlayerIds: number[] = [];
test.beforeAll(async () => {
// Create a test tournament
@@ -13,13 +13,12 @@ const prisma = new PrismaClient();
test.describe('Tournament Admin Permissions', () => {
let tournamentId: number;
let tournamentAdminEmail: string;
let tournamentAdminPassword: string;
test.beforeAll(async () => {
// Create a test tournament admin user
const timestamp = Date.now();
tournamentAdminEmail = `tour-admin-${timestamp}@example.com`;
tournamentAdminPassword = 'TourAdmin123!';
// Create user via API (simulating registration)
// Note: In a real scenario, we'd use the auth API, but for this test
@@ -66,7 +65,7 @@ test.describe('Tournament Admin Permissions', () => {
await prisma.$disconnect();
});
test('tournament_admin can access tournament detail page', async ({ page }) => {
test('tournament_admin can access tournament detail page', async () => {
// Note: This test would require authentication setup
// For now, we'll verify the permission logic works correctly
// by checking the canManageTournament function directly
@@ -84,7 +83,7 @@ test.describe('Tournament Admin Permissions', () => {
test.skip(true, 'Authentication setup required for full e2e test');
});
test('tournament_admin cannot access other users tournaments', async ({ page }) => {
test('tournament_admin cannot access other users tournaments', async () => {
// Create another user's tournament
const otherUser = await prisma.user.create({
data: {