GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Updated DevTools test setup to no longer mock test renerer · react/react@177f357

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/react-devtools-shared/src/__tests__
    • __snapshots__
      • treeContext-test.js.snap
    • setupEnv.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: packages/react-devtools-shared/src/__tests__/__snapshots__/treeContext-test.js.snap
+42Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,48 @@ Object {
10911091
}
10921092
`;
10931093
1094+
exports[`TreeListContext tree state should select the next and previous elements in the tree: 3: select element after (0) 1`] = `
1095+
Object {
1096+
"inspectedElementID": 3,
1097+
"numElements": 4,
1098+
"ownerFlatTree": null,
1099+
"ownerID": null,
1100+
"searchIndex": null,
1101+
"searchResults": Array [],
1102+
"searchText": "",
1103+
"selectedElementID": 3,
1104+
"selectedElementIndex": 1,
1105+
}
1106+
`;
1107+
1108+
exports[`TreeListContext tree state should select the next and previous elements in the tree: 3: select element after (1) 1`] = `
1109+
Object {
1110+
"inspectedElementID": 4,
1111+
"numElements": 4,
1112+
"ownerFlatTree": null,
1113+
"ownerID": null,
1114+
"searchIndex": null,
1115+
"searchResults": Array [],
1116+
"searchText": "",
1117+
"selectedElementID": 4,
1118+
"selectedElementIndex": 2,
1119+
}
1120+
`;
1121+
1122+
exports[`TreeListContext tree state should select the next and previous elements in the tree: 3: select element after (2) 1`] = `
1123+
Object {
1124+
"inspectedElementID": 5,
1125+
"numElements": 4,
1126+
"ownerFlatTree": null,
1127+
"ownerID": null,
1128+
"searchIndex": null,
1129+
"searchResults": Array [],
1130+
"searchText": "",
1131+
"selectedElementID": 5,
1132+
"selectedElementIndex": 3,
1133+
}
1134+
`;
1135+
10941136
exports[`TreeListContext tree state should select the next and previous elements in the tree: 3: select element after (0) 1`] = `
10951137
Object {
10961138
"inspectedElementID": 3,
Collapse file

‎packages/react-devtools-shared/src/__tests__/setupEnv.js‎

Copy file name to clipboardExpand all lines: packages/react-devtools-shared/src/__tests__/setupEnv.js
-10Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
'use strict';
22

3-
// Import test renderer and then reset modules for two reasons:
4-
// 1. We don't want test renderer connected to the DevTools hooks.
5-
// 2. This enables us to work around the on-renderer limitation.
6-
// TODO This (or the resetModules below) might be the cause of the hooks erorr in some tests
7-
const ReactTestRenderer = require.requireActual('react-test-renderer');
8-
9-
jest.resetModules();
10-
11-
jest.mock('react-test-renderer', () => ReactTestRenderer);
12-
133
// DevTools stores preferences between sessions in localStorage
144
if (!global.hasOwnProperty('localStorage')) {
155
global.localStorage = require('local-storage-fallback').default;

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.