From f2e1d0e9449191ab4ca6a2a9bce0b6d9f01f6942 Mon Sep 17 00:00:00 2001 From: Artem Rootman <4586640+artemrootman@users.noreply.github.com> Date: Sun, 5 Apr 2026 17:10:03 +0000 Subject: [PATCH] fix: suppress worker-not-found warnings in test environment The TeamDataWorkerClient logged console.warn when the worker file was not found, which is expected during tests (no build output). The test setup treats unexpected warnings as failures. Downgrade to logger.debug for the "not found" message and remove the eager warning from resolveWorkerPath(). --- src/main/services/team/TeamDataWorkerClient.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/services/team/TeamDataWorkerClient.ts b/src/main/services/team/TeamDataWorkerClient.ts index 8d348542..14e10d7e 100644 --- a/src/main/services/team/TeamDataWorkerClient.ts +++ b/src/main/services/team/TeamDataWorkerClient.ts @@ -43,7 +43,9 @@ function resolveWorkerPath(): string | null { /* ignore */ } } - logger.warn('team-data-worker not found in expected locations'); + // Don't warn here — resolveWorkerPath runs at module load time and + // the worker file is expected to be absent during tests. + // isAvailable() warns once on first access instead. return null; } @@ -61,7 +63,7 @@ export class TeamDataWorkerClient { isAvailable(): boolean { if (!this.workerPath && !this.warnedUnavailable) { this.warnedUnavailable = true; - logger.warn('team-data-worker not found; falling back to main-thread execution'); + logger.debug('team-data-worker not found; falling back to main-thread execution'); } return this.workerPath !== null; }