feat(companion): allow platform disconnect code and reason
This commit is contained in:
@@ -338,8 +338,18 @@ describe('platform clients integration', () => {
|
||||
expect(client.connected).toBe(false);
|
||||
await client.connect();
|
||||
expect(client.connected).toBe(true);
|
||||
client.disconnect();
|
||||
client.disconnect(4100, 'manual platform stop');
|
||||
expect(client.connected).toBe(false);
|
||||
expect(client.getConnectionSnapshot()).toEqual({
|
||||
connected: false,
|
||||
eventSubscriptionCount: 0,
|
||||
pendingRequestCount: 0,
|
||||
pendingEventWaitCount: 0,
|
||||
hasPendingWork: false,
|
||||
idle: true,
|
||||
lastDisconnectCode: 4100,
|
||||
lastDisconnectReason: 'manual platform stop',
|
||||
});
|
||||
});
|
||||
|
||||
it('macOS companion wrapper registers and writes status with platform pinning', async () => {
|
||||
|
||||
Reference in New Issue
Block a user