@@ -55,9 +55,7 @@ describeStack('ReactHostOperationHistoryHook', () => {
55
55
{
56
56
instanceID : inst . _debugID ,
57
57
type : 'mount' ,
58
- payload : ReactDOMFeatureFlags . useCreateElement
59
- ? 'DIV'
60
- : '<div data-reactroot="" data-reactid="1"><p data-reactid="2">Hi.</p></div>' ,
58
+ payload : 'DIV' ,
61
59
} ,
62
60
] ) ;
63
61
} ) ;
@@ -76,10 +74,7 @@ describeStack('ReactHostOperationHistoryHook', () => {
76
74
{
77
75
instanceID : inst . _debugID ,
78
76
type : 'mount' ,
79
- payload : ReactDOMFeatureFlags . useCreateElement
80
- ? 'DIV'
81
- : '<div data-reactroot="" data-reactid="1">' +
82
- '<p data-reactid="2">Hi.</p></div>' ,
77
+ payload : 'DIV' ,
83
78
} ,
84
79
] ) ;
85
80
} ) ;
@@ -141,32 +136,21 @@ describeStack('ReactHostOperationHistoryHook', () => {
141
136
) ;
142
137
143
138
var inst = ReactDOMComponentTree . getInstanceFromNode ( node . firstChild ) ;
144
- if ( ReactDOMFeatureFlags . useCreateElement ) {
145
- assertHistoryMatches ( [
146
- {
147
- instanceID : inst . _debugID ,
148
- type : 'update styles' ,
149
- payload : {
150
- color : 'red' ,
151
- backgroundColor : 'yellow' ,
152
- } ,
153
- } ,
154
- {
155
- instanceID : inst . _debugID ,
156
- type : 'mount' ,
157
- payload : 'DIV' ,
158
- } ,
159
- ] ) ;
160
- } else {
161
- assertHistoryMatches ( [
162
- {
163
- instanceID : inst . _debugID ,
164
- type : 'mount' ,
165
- payload : '<div style="color:red;background-color:yellow" ' +
166
- 'data-reactroot="" data-reactid="1"></div>' ,
139
+ assertHistoryMatches ( [
140
+ {
141
+ instanceID : inst . _debugID ,
142
+ type : 'update styles' ,
143
+ payload : {
144
+ color : 'red' ,
145
+ backgroundColor : 'yellow' ,
167
146
} ,
168
- ] ) ;
169
- }
147
+ } ,
148
+ {
149
+ instanceID : inst . _debugID ,
150
+ type : 'mount' ,
151
+ payload : 'DIV' ,
152
+ } ,
153
+ ] ) ;
170
154
} ) ;
171
155
172
156
it ( 'gets recorded during an update' , ( ) => {
@@ -259,34 +243,23 @@ describeStack('ReactHostOperationHistoryHook', () => {
259
243
ReactDOM . render ( < div className = "rad" tabIndex = { 42 } /> , node ) ;
260
244
261
245
var inst = ReactDOMComponentTree . getInstanceFromNode ( node . firstChild ) ;
262
- if ( ReactDOMFeatureFlags . useCreateElement ) {
263
- assertHistoryMatches ( [
264
- {
265
- instanceID : inst . _debugID ,
266
- type : 'update attribute' ,
267
- payload : { className : 'rad' } ,
268
- } ,
269
- {
270
- instanceID : inst . _debugID ,
271
- type : 'update attribute' ,
272
- payload : { tabIndex : 42 } ,
273
- } ,
274
- {
275
- instanceID : inst . _debugID ,
276
- type : 'mount' ,
277
- payload : 'DIV' ,
278
- } ,
279
- ] ) ;
280
- } else {
281
- assertHistoryMatches ( [
282
- {
283
- instanceID : inst . _debugID ,
284
- type : 'mount' ,
285
- payload : '<div class="rad" tabindex="42" data-reactroot="" ' +
286
- 'data-reactid="1"></div>' ,
287
- } ,
288
- ] ) ;
289
- }
246
+ assertHistoryMatches ( [
247
+ {
248
+ instanceID : inst . _debugID ,
249
+ type : 'update attribute' ,
250
+ payload : { className : 'rad' } ,
251
+ } ,
252
+ {
253
+ instanceID : inst . _debugID ,
254
+ type : 'update attribute' ,
255
+ payload : { tabIndex : 42 } ,
256
+ } ,
257
+ {
258
+ instanceID : inst . _debugID ,
259
+ type : 'mount' ,
260
+ payload : 'DIV' ,
261
+ } ,
262
+ ] ) ;
290
263
} ) ;
291
264
292
265
it ( 'gets recorded during an update' , ( ) => {
@@ -362,34 +335,23 @@ describeStack('ReactHostOperationHistoryHook', () => {
362
335
ReactDOM . render ( < div data-x = "rad" data-y = { 42 } /> , node ) ;
363
336
364
337
var inst = ReactDOMComponentTree . getInstanceFromNode ( node . firstChild ) ;
365
- if ( ReactDOMFeatureFlags . useCreateElement ) {
366
- assertHistoryMatches ( [
367
- {
368
- instanceID : inst . _debugID ,
369
- type : 'update attribute' ,
370
- payload : { 'data-x' : 'rad' } ,
371
- } ,
372
- {
373
- instanceID : inst . _debugID ,
374
- type : 'update attribute' ,
375
- payload : { 'data-y' : 42 } ,
376
- } ,
377
- {
378
- instanceID : inst . _debugID ,
379
- type : 'mount' ,
380
- payload : 'DIV' ,
381
- } ,
382
- ] ) ;
383
- } else {
384
- assertHistoryMatches ( [
385
- {
386
- instanceID : inst . _debugID ,
387
- type : 'mount' ,
388
- payload : '<div data-x="rad" data-y="42" data-reactroot="" ' +
389
- 'data-reactid="1"></div>' ,
390
- } ,
391
- ] ) ;
392
- }
338
+ assertHistoryMatches ( [
339
+ {
340
+ instanceID : inst . _debugID ,
341
+ type : 'update attribute' ,
342
+ payload : { 'data-x' : 'rad' } ,
343
+ } ,
344
+ {
345
+ instanceID : inst . _debugID ,
346
+ type : 'update attribute' ,
347
+ payload : { 'data-y' : 42 } ,
348
+ } ,
349
+ {
350
+ instanceID : inst . _debugID ,
351
+ type : 'mount' ,
352
+ payload : 'DIV' ,
353
+ } ,
354
+ ] ) ;
393
355
} ) ;
394
356
395
357
it ( 'gets recorded during an update' , ( ) => {
@@ -440,34 +402,23 @@ describeStack('ReactHostOperationHistoryHook', () => {
440
402
ReactDOM . render ( < my-component className = "rad" tabIndex = { 42 } /> , node ) ;
441
403
442
404
var inst = ReactDOMComponentTree . getInstanceFromNode ( node . firstChild ) ;
443
- if ( ReactDOMFeatureFlags . useCreateElement ) {
444
- assertHistoryMatches ( [
445
- {
446
- instanceID : inst . _debugID ,
447
- type : 'update attribute' ,
448
- payload : { className : 'rad' } ,
449
- } ,
450
- {
451
- instanceID : inst . _debugID ,
452
- type : 'update attribute' ,
453
- payload : { tabIndex : 42 } ,
454
- } ,
455
- {
456
- instanceID : inst . _debugID ,
457
- type : 'mount' ,
458
- payload : 'MY-COMPONENT' ,
459
- } ,
460
- ] ) ;
461
- } else {
462
- assertHistoryMatches ( [
463
- {
464
- instanceID : inst . _debugID ,
465
- type : 'mount' ,
466
- payload : '<my-component className="rad" tabIndex="42" ' +
467
- 'data-reactroot="" data-reactid="1"></my-component>' ,
468
- } ,
469
- ] ) ;
470
- }
405
+ assertHistoryMatches ( [
406
+ {
407
+ instanceID : inst . _debugID ,
408
+ type : 'update attribute' ,
409
+ payload : { className : 'rad' } ,
410
+ } ,
411
+ {
412
+ instanceID : inst . _debugID ,
413
+ type : 'update attribute' ,
414
+ payload : { tabIndex : 42 } ,
415
+ } ,
416
+ {
417
+ instanceID : inst . _debugID ,
418
+ type : 'mount' ,
419
+ payload : 'MY-COMPONENT' ,
420
+ } ,
421
+ ] ) ;
471
422
} ) ;
472
423
473
424
it ( 'gets recorded during an update' , ( ) => {
0 commit comments