Skip to content

Commit e18e053

Browse files
committed
test(daemon): pin that the appstate refusal resolves no device (#3674)
The appstate refusal reported dispatched: 'no', a value it writes itself, so the test would still pass if the handler resolved a device before answering it. The new assertion pins the behavior instead: resolving the target device never runs on the named-session path. Reordering the guard to resolve-then-refuse with the same code, message, reason and dispatched fields passes every other pin and fails only this one.
1 parent 1114653 commit e18e053

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎packages/daemon/src/sessions/handlers/__tests__/session-appstate-input.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ test('appstate with explicit missing session returns SESSION_NOT_FOUND', async (
242242
expect(response.error.details?.reason).toBe(PRE_DISPATCH_REFUSAL_REASONS.namedSessionNotFound);
243243
expect(response.error.details?.session).toBe('sim');
244244
expect(response.error.details?.dispatched).toBe('no');
245+
expect(mockResolveTargetDevice).not.toHaveBeenCalled();
245246
}
246247
});
247248

0 commit comments

Comments
 (0)