Skip to content

Commit

Permalink
Re-use existing error in test
Browse files Browse the repository at this point in the history
  • Loading branch information
KarimP committed Jun 22, 2023
1 parent e94f924 commit 0ab4828
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,12 @@ describe('ReactDOMServerFB', () => {
</Suspense>
</div>,
{
onError(x) {
errors.push(x.message);
onError(error) {
errors.push(error);
},
},
);
const reason = 'Test abort reason';
ReactDOMServer.abortStream(stream, new Error(reason));
expect(errors).toEqual([reason]);
ReactDOMServer.abortStream(stream, theError);
expect(errors).toEqual([theError]);
});
});

0 comments on commit 0ab4828

Please sign in to comment.