You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
silenceMessage still prints message even when returning true
Description
failOnConsole({
shouldFailOnWarn: true,
shouldFailOnError: true,
silenceMessage(message, method) {
const ignoredErrors = [
'This is a no-op, but it indicates a memory leak in your application.',
];
const ignoredWarnings = [
'This is a no-op, but it indicates a memory leak in your application',
];
if (
(method === 'warn' && ignoredWarnings.some((msg) => message.includes(msg))) ||
(method === 'error' && ignoredErrors.some((msg) => message.includes(msg)))
) {
return true;
}
return false;
},
});
Expected outcome
no message being printed at all!
Actual outcome
The test does not fail, but it prints the message:
stderr | client/app/pages/settings/__tests__/Settings.test.tsx > OrganisationSettings > renders correctly for single user
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
at OrganizationSettings
...
Screenshots / Video / StackTrace
The text was updated successfully, but these errors were encountered:
Bug description
silenceMessage still prints message even when returning true
Description
Expected outcome
Actual outcome
The test does not fail, but it prints the message:
Screenshots / Video / StackTrace
The text was updated successfully, but these errors were encountered: