Skip to content

Commit

Permalink
Update tests to account for new event data in snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed Jul 26, 2021
1 parent 4409be8 commit 8b113b8
Showing 1 changed file with 41 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,11 @@ describe(preprocessData, () => {

expect(preprocessData([cpuProfilerSample, randomSample])).toStrictEqual({
duration: 0.002,
events: [],
flamechart: [],
measures: [],
nativeEvents: [],
otherUserTimingMarks: [],
reactEvents: [],
startTime: 1,
});
});
Expand Down Expand Up @@ -258,15 +259,6 @@ describe(preprocessData, () => {
]),
).toStrictEqual({
duration: 0.008,
events: [
{
componentStack: '',
laneLabels: [],
lanes: [9],
timestamp: 0.002,
type: 'schedule-render',
},
],
flamechart: [],
measures: [
{
Expand Down Expand Up @@ -306,7 +298,17 @@ describe(preprocessData, () => {
type: 'layout-effects',
},
],
nativeEvents: [],
otherUserTimingMarks: [],
reactEvents: [
{
componentStack: '',
laneLabels: [],
lanes: [9],
timestamp: 0.002,
type: 'schedule-render',
},
],
startTime: 1,
});
});
Expand All @@ -320,15 +322,6 @@ describe(preprocessData, () => {
const userTimingData = createUserTimingData(clearedMarks);
expect(preprocessData(userTimingData)).toStrictEqual({
duration: 0.011,
events: [
{
componentStack: '',
laneLabels: ['Sync'],
lanes: [0],
timestamp: 0.005,
type: 'schedule-render',
},
],
flamechart: [],
measures: [
{
Expand Down Expand Up @@ -368,6 +361,7 @@ describe(preprocessData, () => {
type: 'layout-effects',
},
],
nativeEvents: [],
otherUserTimingMarks: [
{
name: '__v3',
Expand All @@ -378,6 +372,15 @@ describe(preprocessData, () => {
timestamp: 0.004,
},
],
reactEvents: [
{
componentStack: '',
laneLabels: ['Sync'],
lanes: [0],
timestamp: 0.005,
type: 'schedule-render',
},
],
startTime: 1,
});
});
Expand All @@ -400,24 +403,6 @@ describe(preprocessData, () => {
const userTimingData = createUserTimingData(clearedMarks);
expect(preprocessData(userTimingData)).toStrictEqual({
duration: 0.022,
events: [
{
componentStack: '',
laneLabels: ['Default'],
lanes: [4],
timestamp: 0.005,
type: 'schedule-render',
},
{
componentName: 'App',
componentStack: '',
isCascading: false,
laneLabels: ['Default'],
lanes: [4],
timestamp: 0.013,
type: 'schedule-state-update',
},
],
flamechart: [],
measures: [
{
Expand Down Expand Up @@ -511,6 +496,7 @@ describe(preprocessData, () => {
type: 'passive-effects',
},
],
nativeEvents: [],
otherUserTimingMarks: [
{
name: '__v3',
Expand All @@ -521,6 +507,24 @@ describe(preprocessData, () => {
timestamp: 0.004,
},
],
reactEvents: [
{
componentStack: '',
laneLabels: ['Default'],
lanes: [4],
timestamp: 0.005,
type: 'schedule-render',
},
{
componentName: 'App',
componentStack: '',
isCascading: false,
laneLabels: ['Default'],
lanes: [4],
timestamp: 0.013,
type: 'schedule-state-update',
},
],
startTime: 1,
});
});
Expand Down

0 comments on commit 8b113b8

Please sign in to comment.