Skip to content

Commit

Permalink
Update IDs in snapshots
Browse files Browse the repository at this point in the history
If we remount due to filters we've now increased ids (inspectedElement).

However we also avoid creating ids for filtered components (profilingCache).
  • Loading branch information
sebmarkbage committed Aug 12, 2024
1 parent c64c9b0 commit d511eaf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2142,7 +2142,7 @@ describe('InspectedElement', () => {
"context": null,
"events": undefined,
"hooks": null,
"id": 2,
"id": 4,
"owners": null,
"props": {},
"rootType": "createRoot()",
Expand Down Expand Up @@ -2893,15 +2893,15 @@ describe('InspectedElement', () => {
"compiledWithForget": false,
"displayName": "Child",
"hocDisplayNames": null,
"id": 5,
"id": 8,
"key": null,
"type": 5,
},
{
"compiledWithForget": false,
"displayName": "App",
"hocDisplayNames": null,
"id": 4,
"id": 7,
"key": null,
"type": 5,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1251,17 +1251,17 @@ describe('ProfilingCache', () => {
Map {
1 => 16,
2 => 16,
3 => 1,
4 => 1,
6 => 1,
}
`);

expect(commitData[0].fiberSelfDurations).toMatchInlineSnapshot(`
Map {
1 => 0,
2 => 10,
3 => 1,
4 => 1,
6 => 1,
}
`);
});
Expand Down Expand Up @@ -1322,13 +1322,13 @@ describe('ProfilingCache', () => {
`);
expect(commitData[1].fiberActualDurations).toMatchInlineSnapshot(`
Map {
7 => 3,
5 => 3,
3 => 3,
}
`);
expect(commitData[1].fiberSelfDurations).toMatchInlineSnapshot(`
Map {
7 => 3,
5 => 3,
3 => 0,
}
`);
Expand Down

0 comments on commit d511eaf

Please sign in to comment.