fix(synology-chat): use Readable stream in integration test for Windows compat

Replace EventEmitter + process.nextTick with Readable stream for
request body simulation. The process.nextTick approach caused the test
to hang on Windows CI (120s timeout) because events were not reliably
delivered to readBody() listeners.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
druide67
2026-02-27 15:52:09 +01:00
committed by Peter Steinberger
parent ce12b9092f
commit d5df0cb2fa

View File

@@ -102,6 +102,8 @@ describe("Synology channel wiring integration", () => {
expect(res._body).toContain("not authorized");
expect(dispatchReplyWithBufferedBlockDispatcher).not.toHaveBeenCalled();
started.stop();
if (started && typeof started === "object" && "stop" in started) {
(started as { stop: () => void }).stop();
}
});
});