Skip to content

Commit

Permalink
Fix jest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sebelga committed Nov 27, 2024
1 parent 9e1675c commit a4691d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/kbn-test/src/jest/setup/react_testing_library.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ jest.mock('@testing-library/react', () => {
const originalConsoleError = console.error;
console.error = (...args) => {
if (global.IS_REACT_ACT_ENVIRONMENT === false) {
if (args[0].includes('Warning: An update to %s inside a test was not wrapped in act')) {
if (
args[0].toString().includes('Warning: An update to %s inside a test was not wrapped in act')
) {
return;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ describe('Panel', () => {
id: 'group2',
title: 'Group 2',
path: 'root.group2',
href: '/app/group2',
renderAs: 'panelOpener',
children: [
// sideNavStatus is "visible" by default
Expand Down

0 comments on commit a4691d1

Please sign in to comment.