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().
This commit is contained in:
parent
e81116b85e
commit
f2e1d0e944
1 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue