From 886fa4ef198b92375c2c896756d2afc9950c3378 Mon Sep 17 00:00:00 2001 From: Anton Dosov Date: Thu, 7 Nov 2024 16:02:34 +0100 Subject: [PATCH] add comment --- packages/kbn-test/src/jest/setup/react_testing_library.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/kbn-test/src/jest/setup/react_testing_library.js b/packages/kbn-test/src/jest/setup/react_testing_library.js index 2d65997cd9ae7..1444aa41949ef 100644 --- a/packages/kbn-test/src/jest/setup/react_testing_library.js +++ b/packages/kbn-test/src/jest/setup/react_testing_library.js @@ -39,6 +39,7 @@ jest.mock('@testing-library/react', () => { // The testing library mutes the act warnings in some cases by setting IS_REACT_ACT_ENVIRONMENT which is React@18 feature https://github.com/testing-library/react-testing-library/pull/1137/ // Using this console override we're muting the act warnings as well // Tracking issue to clean this up https://github.com/elastic/kibana/issues/199100 +// NOTE: we're not muting all the act warnings but only those that testing-library wanted to mute const originalConsoleError = console.error; console.error = (...args) => { if (global.IS_REACT_ACT_ENVIRONMENT === false) {