diff --git a/worker/package-lock.json b/worker/package-lock.json index e0bf723..863e78e 100644 --- a/worker/package-lock.json +++ b/worker/package-lock.json @@ -2099,7 +2099,6 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -2378,7 +2377,6 @@ "integrity": "sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "pathe": "^2.0.3" } @@ -2389,7 +2387,6 @@ "integrity": "sha512-dZwN5L1VlUBewiP6H9s2+B3e3Jg96D0vzN+Ry73sOefebhYr9f94wwkMNN/9ouoU8pV1BqA1d1zGk8928cx0rg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.27.0", "fdir": "^6.5.0", diff --git a/worker/seed.sql b/worker/seed.sql index 09fce8a..0d192e1 100644 --- a/worker/seed.sql +++ b/worker/seed.sql @@ -13,7 +13,7 @@ INSERT INTO teams (id, name, elttl_url, created_at, updated_at) VALUES ( '00000000-0000-0000-0000-000000000000', 'Test Team E2E', - 'https://www.elttl.co.uk/Availability.aspx?FixtureId=0&TeamId=999', + 'https://elttl.interactive.co.uk/teams/view/999', strftime('%s', 'now'), strftime('%s', 'now') ); diff --git a/worker/src/database.integration.test.ts b/worker/src/database.integration.test.ts index 9470e1c..13ef74d 100644 --- a/worker/src/database.integration.test.ts +++ b/worker/src/database.integration.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect, beforeEach, afterEach } from 'vitest'; +import { describe, it, expect, beforeEach } from 'vitest'; import { DatabaseService } from './database'; // Note: These are integration tests that require a real D1 database instance diff --git a/worker/src/database.ts b/worker/src/database.ts index ce6c471..6c61d25 100644 --- a/worker/src/database.ts +++ b/worker/src/database.ts @@ -1,5 +1,5 @@ import type { Env, Team, Fixture, Player, Availability, FinalSelection } from './types'; -import { generateUUID, now, isPastDate, getAvailabilityKey } from './utils'; +import { generateUUID, now, isPastDate } from './utils'; /** * Database service for D1 operations diff --git a/worker/src/validation.test.ts b/worker/src/validation.test.ts index 69bf13b..295e8a8 100644 --- a/worker/src/validation.test.ts +++ b/worker/src/validation.test.ts @@ -225,9 +225,7 @@ describe('Player Summary Calculations', () => { const gamesScheduled = 3; const totalGames = gamesPlayed + gamesScheduled; // 8 - const selectionRate = totalGames > 0 - ? Math.round((gamesScheduled / totalGames) * 100) - : 0; + const selectionRate = Math.round((gamesScheduled / totalGames) * 100); expect(selectionRate).toBe(38); // 3/8 = 37.5% rounds to 38% }); @@ -244,13 +242,10 @@ describe('Player Summary Calculations', () => { }); it('should calculate 100% selection rate', () => { - const gamesPlayed = 0; const gamesScheduled = 5; - const totalGames = gamesScheduled; + const totalGames = 5; - const selectionRate = totalGames > 0 - ? Math.round((gamesScheduled / totalGames) * 100) - : 0; + const selectionRate = Math.round((gamesScheduled / totalGames) * 100); expect(selectionRate).toBe(100); });