fix(companion): validate waitForIdle timeout option
This commit is contained in:
@@ -661,6 +661,16 @@ describe('CompanionRuntimeClient', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('waitForIdle validates timeoutMs option', () => {
|
||||
const client = new CompanionRuntimeClient({
|
||||
url: 'ws://127.0.0.1:1',
|
||||
});
|
||||
|
||||
expect(() => client.waitForIdle({ timeoutMs: 0 })).toThrow(
|
||||
'timeoutMs must be a positive number',
|
||||
);
|
||||
});
|
||||
|
||||
it('waitForIdle resolves after pending event waiters are cleared', async () => {
|
||||
const client = new CompanionRuntimeClient({
|
||||
url: 'ws://127.0.0.1:1',
|
||||
|
||||
Reference in New Issue
Block a user