Skip to content

Commit aa4b5ba

Browse files
committed
Updated tests to include key
1 parent 15860a2 commit aa4b5ba

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/backend/__tests__/ignore/stateComponents-testcases.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import deepCopy from './deepCopy';
1111
export const root: Fiber = {
1212
tag: HostRoot,
1313
elementType: null,
14+
key: null,
1415
sibling: null,
1516
stateNode: null,
1617
child: null,
@@ -31,6 +32,7 @@ export const functionalComponent: Fiber = {
3132
elementType: IncrementFunc,
3233
sibling: null,
3334
stateNode: null,
35+
key: null,
3436
child: null,
3537
memoizedState: {
3638
memoizedState: 0,
@@ -53,6 +55,7 @@ const functionalComponentData: ComponentData = {
5355
actualStartTime: 2,
5456
selfBaseDuration: 3,
5557
treeBaseDuration: 4,
58+
key: null,
5659
context: {},
5760
hooksIndex: [0],
5861
hooksState: { count: 0 },
@@ -72,6 +75,7 @@ export const classComponent: Fiber = {
7275
tag: ClassComponent,
7376
elementType: IncrementClass,
7477
sibling: null,
78+
key: null,
7579
stateNode: {
7680
state: { count: 0 },
7781
setState: function (callback) {
@@ -98,6 +102,7 @@ const classComponentData: ComponentData = {
98102
actualStartTime: 2,
99103
selfBaseDuration: 3,
100104
treeBaseDuration: 4,
105+
key: null,
101106
context: {},
102107
hooksIndex: null,
103108
hooksState: null,

src/backend/__tests__/masterTree.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ describe('master tree tests', () => {
3838
actualStartTime: 2,
3939
selfBaseDuration: 3,
4040
treeBaseDuration: 4,
41+
key: null,
4142
context: {},
4243
hooksIndex: null,
4344
hooksState: null,

0 commit comments

Comments
 (0)