Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
gnoff committed Nov 1, 2023
1 parent 6147ad9 commit 95a5efc
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,14 @@ describe('ReactFlightDOMReply', () => {
expect(s2.has('hi')).toBe(true);
expect(s2).toEqual(s);
});

it('does not hang indefinitely when calling decodeReply with FormData', async () => {
let error;
try {
await ReactServerDOMServer.decodeReply(new FormData(), webpackServerMap);
} catch (e) {
error = e;
}
expect(error.message).toBe('Connection closed.');
});
});

0 comments on commit 95a5efc

Please sign in to comment.