diff --git a/scripts/jest/setup/throw_on_console_error.js b/scripts/jest/setup/throw_on_console_error.js index b0c208cd5b8..534a7e36a8b 100644 --- a/scripts/jest/setup/throw_on_console_error.js +++ b/scripts/jest/setup/throw_on_console_error.js @@ -37,18 +37,5 @@ console.error = (message, ...rest) => { return; } - // Print React validateDOMNesting warning as a console.warn instead - // of throwing an error. - // TODO: Remove when edge-case DOM nesting is fixed in all components - if ( - typeof message === 'string' && - message.startsWith( - 'Warning: validateDOMNesting(...): %s cannot appear as a child of <%s>' - ) - ) { - console.warn(message, ...rest); - return; - } - throw new Error(format(message, ...rest)); };