Skip to content

Commit 6a5f2fc

Browse files
author
Jack Pope
committed
Silence warning in devtools tests
1 parent 54a0739 commit 6a5f2fc

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

packages/react-devtools-shared/src/__tests__/setupTests.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ beforeEach(() => {
5858
jest.useFakeTimers();
5959

6060
// Use utils.js#withErrorsOrWarningsIgnored instead of directly mutating this array.
61-
global._ignoredErrorOrWarningMessages = [];
61+
global._ignoredErrorOrWarningMessages = [
62+
'react-test-renderer is deprecated.',
63+
];
6264
function shouldIgnoreConsoleErrorOrWarn(args) {
6365
let firstArg = args[0];
6466
if (

packages/react-devtools-shared/src/__tests__/treeContext-test.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -2586,14 +2586,14 @@ describe('TreeListContext', () => {
25862586
utils.act(() => TestRenderer.create(<Contexts />));
25872587

25882588
expect(store).toMatchInlineSnapshot(`
2589-
✕ 1, ⚠ 0
2589+
✕ 1, ⚠ 1
25902590
[root]
25912591
<ErrorBoundary> ✕
25922592
`);
25932593

25942594
selectNextErrorOrWarning();
25952595
expect(state).toMatchInlineSnapshot(`
2596-
✕ 1, ⚠ 0
2596+
✕ 1, ⚠ 1
25972597
[root]
25982598
→ <ErrorBoundary> ✕
25992599
`);
@@ -2648,14 +2648,14 @@ describe('TreeListContext', () => {
26482648
utils.act(() => TestRenderer.create(<Contexts />));
26492649

26502650
expect(store).toMatchInlineSnapshot(`
2651-
✕ 1, ⚠ 0
2651+
✕ 1, ⚠ 1
26522652
[root]
26532653
<ErrorBoundary> ✕
26542654
`);
26552655

26562656
selectNextErrorOrWarning();
26572657
expect(state).toMatchInlineSnapshot(`
2658-
✕ 1, ⚠ 0
2658+
✕ 1, ⚠ 1
26592659
[root]
26602660
→ <ErrorBoundary> ✕
26612661
`);
@@ -2705,15 +2705,15 @@ describe('TreeListContext', () => {
27052705
utils.act(() => TestRenderer.create(<Contexts />));
27062706

27072707
expect(store).toMatchInlineSnapshot(`
2708-
✕ 2, ⚠ 0
2708+
✕ 2, ⚠ 1
27092709
[root]
27102710
▾ <ErrorBoundary> ✕
27112711
<Child> ✕
27122712
`);
27132713

27142714
selectNextErrorOrWarning();
27152715
expect(state).toMatchInlineSnapshot(`
2716-
✕ 2, ⚠ 0
2716+
✕ 2, ⚠ 1
27172717
[root]
27182718
→ ▾ <ErrorBoundary> ✕
27192719
<Child> ✕

0 commit comments

Comments
 (0)