@@ -173,7 +173,7 @@ export function requireTestRenderer(): ReactTestRenderer {
173
173
export function exportImportHelper ( bridge : FrontendBridge , store : Store ) : void {
174
174
const {
175
175
prepareProfilingDataExport,
176
- prepareProfilingDataFrontendFromExport ,
176
+ prepareProfilingDataFrontendFromImport ,
177
177
} = require ( 'react-devtools-shared/src/devtools/views/Profiler/utils' ) ;
178
178
179
179
const { profilerStore} = store ;
@@ -194,18 +194,20 @@ export function exportImportHelper(bridge: FrontendBridge, store: Store): void {
194
194
) ;
195
195
const parsedProfilingDataExport = JSON . parse ( serializedProfilingDataExport ) ;
196
196
197
- const profilingDataFrontend = prepareProfilingDataFrontendFromExport (
197
+ const profilingDataFrontendImport = prepareProfilingDataFrontendFromImport (
198
198
( parsedProfilingDataExport : any ) ,
199
199
) ;
200
200
201
201
// Sanity check that profiling snapshots are serialized correctly.
202
- expect ( profilingDataFrontendInitial ) . toEqual ( profilingDataFrontend ) ;
202
+ expect ( profilingDataFrontendInitial . dataForRoots ) . toEqual (
203
+ profilingDataFrontendImport . dataForRoots ,
204
+ ) ;
203
205
204
206
// Snapshot the JSON-parsed object, rather than the raw string, because Jest formats the diff nicer.
205
207
expect ( parsedProfilingDataExport ) . toMatchSnapshot ( 'imported data' ) ;
206
208
207
209
act ( ( ) => {
208
- // Apply the new exported-then-reimported data so tests can re-run assertions.
209
- profilerStore . profilingData = profilingDataFrontend ;
210
+ // Apply the new exported-then-imported data so tests can re-run assertions.
211
+ profilerStore . profilingData = profilingDataFrontendImport ;
210
212
} ) ;
211
213
}
0 commit comments