diff --git a/packages/react-server-dom-fb/src/__tests__/ReactDOMServerFB-test.internal.js b/packages/react-server-dom-fb/src/__tests__/ReactDOMServerFB-test.internal.js index bc1b92db9e648..7b3460066405b 100644 --- a/packages/react-server-dom-fb/src/__tests__/ReactDOMServerFB-test.internal.js +++ b/packages/react-server-dom-fb/src/__tests__/ReactDOMServerFB-test.internal.js @@ -205,13 +205,12 @@ describe('ReactDOMServerFB', () => { , { - 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]); }); });