File tree Expand file tree Collapse file tree 2 files changed +42
-10
lines changed
packages/react-devtools-shared/src/__tests__ Expand file tree Collapse file tree 2 files changed +42
-10
lines changed Original file line number Diff line number Diff 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+
10941136exports[`TreeListContext tree state should select the next and previous elements in the tree: 3: select element after (0) 1`] = `
10951137Object {
10961138 " inspectedElementID" : 3 ,
Original file line number Diff line number Diff line change 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
144if ( ! global . hasOwnProperty ( 'localStorage' ) ) {
155 global . localStorage = require ( 'local-storage-fallback' ) . default ;
You can’t perform that action at this time.
0 commit comments