feat(companion): add platform createHeartbeatLoop helper
This commit is contained in:
@@ -223,4 +223,19 @@ describe('platform companion clients', () => {
|
||||
'sessionId is required (provide one or configure defaultSessionId)',
|
||||
);
|
||||
});
|
||||
|
||||
it('creates a bound heartbeat loop helper from platform clients', async () => {
|
||||
const mock = createRuntimeMock();
|
||||
const client = new IOSCompanionClient({ runtime: mock.runtime, nodeId: 'ios-node' });
|
||||
|
||||
const loop = client.createHeartbeatLoop();
|
||||
await loop.tickNow();
|
||||
|
||||
expect(mock.setNodeStatus).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
platform: 'ios',
|
||||
statusText: 'heartbeat',
|
||||
}),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user