Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions packages/react-dom/src/__tests__/ReactTestUtils-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down
4 changes: 3 additions & 1 deletion packages/react-reconciler/src/ReactFiberScheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -1815,8 +1815,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),
);
}
}
Expand Down