Skip to content

Commit

Permalink
Updated profiler failing (snapshot) tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed Jul 31, 2021
1 parent 1399595 commit 245d7c3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,9 @@ describe(preprocessData, () => {
measures: [],
nativeEvents: [],
otherUserTimingMarks: [],
reactEvents: [],
schedulingEvents: [],
startTime: 1,
suspenseEvents: [],
});
});

Expand Down Expand Up @@ -300,16 +301,17 @@ describe(preprocessData, () => {
],
nativeEvents: [],
otherUserTimingMarks: [],
reactEvents: [
schedulingEvents: [
{
componentStack: '',
laneLabels: [],
lanes: [9],
timestamp: 0.002,
type: 'schedule-render',
warning: null,
},
],
startTime: 1,
suspenseEvents: [],
});
});

Expand Down Expand Up @@ -372,16 +374,17 @@ describe(preprocessData, () => {
timestamp: 0.004,
},
],
reactEvents: [
schedulingEvents: [
{
componentStack: '',
laneLabels: ['Sync'],
lanes: [0],
timestamp: 0.005,
type: 'schedule-render',
warning: null,
},
],
startTime: 1,
suspenseEvents: [],
});
});

Expand Down Expand Up @@ -507,25 +510,25 @@ describe(preprocessData, () => {
timestamp: 0.004,
},
],
reactEvents: [
schedulingEvents: [
{
componentStack: '',
laneLabels: ['Default'],
lanes: [4],
timestamp: 0.005,
type: 'schedule-render',
warning: null,
},
{
componentName: 'App',
componentStack: '',
isCascading: false,
laneLabels: ['Default'],
lanes: [4],
timestamp: 0.013,
type: 'schedule-state-update',
warning: null,
},
],
startTime: 1,
suspenseEvents: [],
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ describe('SchedulingProfiler', () => {
`--react-init-${ReactVersion}`,
`--schedule-render-${formatLanes(ReactFiberLane.SyncLane)}`,
`--render-start-${formatLanes(ReactFiberLane.SyncLane)}`,
'--suspense-suspend-0-Example',
'--suspense-suspend-0-Example-mount-1-Sync',
'--render-stop',
`--commit-start-${formatLanes(ReactFiberLane.SyncLane)}`,
`--layout-effects-start-${formatLanes(ReactFiberLane.SyncLane)}`,
Expand Down Expand Up @@ -239,7 +239,7 @@ describe('SchedulingProfiler', () => {
`--react-init-${ReactVersion}`,
`--schedule-render-${formatLanes(ReactFiberLane.SyncLane)}`,
`--render-start-${formatLanes(ReactFiberLane.SyncLane)}`,
'--suspense-suspend-0-Example',
'--suspense-suspend-0-Example-mount-1-Sync',
'--render-stop',
`--commit-start-${formatLanes(ReactFiberLane.SyncLane)}`,
`--layout-effects-start-${formatLanes(ReactFiberLane.SyncLane)}`,
Expand Down Expand Up @@ -278,7 +278,7 @@ describe('SchedulingProfiler', () => {

expectMarksToEqual([
`--render-start-${formatLanes(ReactFiberLane.DefaultLane)}`,
'--suspense-suspend-0-Example',
'--suspense-suspend-0-Example-mount-16-Default',
'--render-stop',
`--commit-start-${formatLanes(ReactFiberLane.DefaultLane)}`,
`--layout-effects-start-${formatLanes(ReactFiberLane.DefaultLane)}`,
Expand Down Expand Up @@ -317,7 +317,7 @@ describe('SchedulingProfiler', () => {

expectMarksToEqual([
`--render-start-${formatLanes(ReactFiberLane.DefaultLane)}`,
'--suspense-suspend-0-Example',
'--suspense-suspend-0-Example-mount-16-Default',
'--render-stop',
`--commit-start-${formatLanes(ReactFiberLane.DefaultLane)}`,
`--layout-effects-start-${formatLanes(ReactFiberLane.DefaultLane)}`,
Expand Down

0 comments on commit 245d7c3

Please sign in to comment.