test(companion): add non-finite waitForIdle validation coverage
This commit is contained in:
@@ -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