diff --git a/packages/react-dom/src/__tests__/ReactTestUtils-test.js b/packages/react-dom/src/__tests__/ReactTestUtils-test.js index 280908c77a0c5..3e35c28dbc20d 100644 --- a/packages/react-dom/src/__tests__/ReactTestUtils-test.js +++ b/packages/react-dom/src/__tests__/ReactTestUtils-test.js @@ -634,10 +634,9 @@ describe('ReactTestUtils', () => { button.dispatchEvent(new MouseEvent('click', {bubbles: true})); }); expect(button.innerHTML).toBe('2'); - expect(() => setValueRef(1)).toWarnDev( - ['An update to App inside a test was not wrapped in act(...).'], - {withoutStack: 1}, - ); + expect(() => setValueRef(1)).toWarnDev([ + 'An update to App inside a test was not wrapped in act(...).', + ]); document.body.removeChild(container); }); diff --git a/packages/react-reconciler/src/ReactFiberScheduler.js b/packages/react-reconciler/src/ReactFiberScheduler.js index c86b66d2b8b38..9fe67f90aa7f8 100644 --- a/packages/react-reconciler/src/ReactFiberScheduler.js +++ b/packages/react-reconciler/src/ReactFiberScheduler.js @@ -1839,8 +1839,10 @@ export function warnIfNotCurrentlyBatchingInDev(fiber: Fiber): void { '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see in the browser." + - ' Learn more at https://fb.me/react-wrap-tests-with-act', + ' Learn more at https://fb.me/react-wrap-tests-with-act' + + '%s', getComponentName(fiber.type), + getStackByFiberInDevAndProd(fiber), ); } }