[test] Assert aborted Replies reject Promises (#36862)
Minh Vu committed
Jun 25, 2026 at 08:29 UTC
76caf32216b6c9b4653eddc3e3d14b5ae12e0109
1 file changed
+1
-3
packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMReply-test.js
+1
-3
@@ -740,9 +740,7 @@ describe('ReactFlightDOMReply', () => {
740
741
const result = await ReactServerDOMServer.decodeReply(await bodyPromise);
742
expect(result.hello).toBe('world');
743
- // TODO: await result.promise should reject at this point because the stream
744
- // has closed but that's a bug in both ReactFlightReplyServer and ReactFlightClient.
745
- // It just halts in this case.
743
+ await expect(result.promise).rejects.toThrow('Connection closed.');
744
});
745
746
it('cannot deserialize a Blob reference backed by a string', async () => {