test(companion): add non-finite waitForIdle validation coverage
This commit is contained in:
@@ -1092,6 +1092,17 @@
|
||||
],
|
||||
"test_status": "pnpm test:run src/companion/platformClients.integration.test.ts src/companion/platformClients.test.ts src/companion/runtimeClient.test.ts src/companion/heartbeatLoop.test.ts + pnpm typecheck passing"
|
||||
},
|
||||
"companion-runtime-wait-for-idle-nonfinite-validation-coverage": {
|
||||
"status": "completed",
|
||||
"date": "2026-02-17",
|
||||
"updated": "2026-02-17",
|
||||
"summary": "Extended `waitForIdle()` option-validation coverage to include non-finite `timeoutMs`/`pollIntervalMs` values (`NaN`, `Infinity`) for deterministic guardrail behavior.",
|
||||
"files_modified": [
|
||||
"src/companion/runtimeClient.test.ts",
|
||||
"docs/plans/state.json"
|
||||
],
|
||||
"test_status": "pnpm test:run src/companion/runtimeClient.test.ts src/companion/platformClients.test.ts src/companion/heartbeatLoop.test.ts src/companion/platformClients.integration.test.ts + pnpm typecheck passing"
|
||||
},
|
||||
"browser-tools-activation-clarity": {
|
||||
"status": "completed",
|
||||
"date": "2026-02-17",
|
||||
|
||||
@@ -719,6 +719,12 @@ describe('CompanionRuntimeClient', () => {
|
||||
expect(() => client.waitForIdle({ pollIntervalMs: 0 })).toThrow(
|
||||
'pollIntervalMs must be a positive number',
|
||||
);
|
||||
expect(() => client.waitForIdle({ pollIntervalMs: Number.NaN })).toThrow(
|
||||
'pollIntervalMs must be a positive number',
|
||||
);
|
||||
expect(() => client.waitForIdle({ pollIntervalMs: Number.POSITIVE_INFINITY })).toThrow(
|
||||
'pollIntervalMs must be a positive number',
|
||||
);
|
||||
});
|
||||
|
||||
it('waitForIdle validates timeoutMs option', () => {
|
||||
@@ -729,6 +735,12 @@ describe('CompanionRuntimeClient', () => {
|
||||
expect(() => client.waitForIdle({ timeoutMs: 0 })).toThrow(
|
||||
'timeoutMs must be a positive number',
|
||||
);
|
||||
expect(() => client.waitForIdle({ timeoutMs: Number.NaN })).toThrow(
|
||||
'timeoutMs must be a positive number',
|
||||
);
|
||||
expect(() => client.waitForIdle({ timeoutMs: Number.POSITIVE_INFINITY })).toThrow(
|
||||
'timeoutMs must be a positive number',
|
||||
);
|
||||
});
|
||||
|
||||
it('waitForIdle resolves after pending event waiters are cleared', async () => {
|
||||
|
||||
Reference in New Issue
Block a user