fix(tests): resolve 4 post-phase test failures
- platformClients.integration: iOS/Android push tests lacked setStatus() call before listNodes(), so platform filter excluded nodes. Added publishHeartbeat() to set platform on connection state. - server.test: agent.send now emits run_state events before done (Phase 1). Added sendAndWaitForDone() helper and updated test to find done event rather than assuming index 0. - handlers.test: updated agent.send/cancel assertions to use find() and pass send arg to agent.cancel, consistent with run_state events. - httpBody: req.destroy() closed socket before 413 response could be sent. Removed socket destruction from body reader; 413 responses now send Connection: close so Node closes the connection cleanly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -396,6 +396,7 @@ describe('platform clients integration', () => {
|
||||
|
||||
try {
|
||||
await client.register();
|
||||
await client.publishHeartbeat();
|
||||
const push = await client.registerPushToken({
|
||||
token: 'd'.repeat(64),
|
||||
topic: 'dev.flynn.ios',
|
||||
@@ -424,6 +425,7 @@ describe('platform clients integration', () => {
|
||||
|
||||
try {
|
||||
await client.register();
|
||||
await client.publishHeartbeat();
|
||||
const push = await client.registerPushToken('e'.repeat(64));
|
||||
|
||||
expect(push.updated).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user