@@ -16,6 +16,9 @@ describe('DebugTracing', () => {
1616
1717 let logs ;
1818
19+ const DEFAULT_LANE_STRING = '0b0000000000000000000000010000000' ;
20+ const RETRY_LANE_STRING = '0b0000000100000000000000000000000' ;
21+
1922 beforeEach ( ( ) => {
2023 jest . resetModules ( ) ;
2124
@@ -129,9 +132,9 @@ describe('DebugTracing', () => {
129132 expect ( Scheduler ) . toFlushUntilNextPaint ( [ ] ) ;
130133
131134 expect ( logs ) . toEqual ( [
132- ' group: ⚛️ render (0b0000000010000000000000000000000)' ,
135+ ` group: ⚛️ render (${ RETRY_LANE_STRING } )` ,
133136 'log: <Example/>' ,
134- ' groupEnd: ⚛️ render (0b0000000010000000000000000000000)' ,
137+ ` groupEnd: ⚛️ render (${ RETRY_LANE_STRING } )` ,
135138 ] ) ;
136139 } ) ;
137140
@@ -158,9 +161,9 @@ describe('DebugTracing', () => {
158161 expect ( Scheduler ) . toFlushUntilNextPaint ( [ ] ) ;
159162
160163 expect ( logs ) . toEqual ( [
161- ' group: ⚛️ render (0b0000000000000000000001000000000)' ,
164+ ` group: ⚛️ render (${ DEFAULT_LANE_STRING } )` ,
162165 'log: ⚛️ Example suspended' ,
163- ' groupEnd: ⚛️ render (0b0000000000000000000001000000000)' ,
166+ ` groupEnd: ⚛️ render (${ DEFAULT_LANE_STRING } )` ,
164167 ] ) ;
165168
166169 logs . splice ( 0 ) ;
@@ -199,19 +202,19 @@ describe('DebugTracing', () => {
199202 expect ( Scheduler ) . toFlushUntilNextPaint ( [ ] ) ;
200203
201204 expect ( logs ) . toEqual ( [
202- ' group: ⚛️ render (0b0000000000000000000001000000000)' ,
205+ ` group: ⚛️ render (${ DEFAULT_LANE_STRING } )` ,
203206 'log: <Wrapper/>' ,
204- ' groupEnd: ⚛️ render (0b0000000000000000000001000000000)' ,
207+ ` groupEnd: ⚛️ render (${ DEFAULT_LANE_STRING } )` ,
205208 ] ) ;
206209
207210 logs . splice ( 0 ) ;
208211
209212 expect ( Scheduler ) . toFlushUntilNextPaint ( [ ] ) ;
210213
211214 expect ( logs ) . toEqual ( [
212- ' group: ⚛️ render (0b0000000010000000000000000000000)' ,
215+ ` group: ⚛️ render (${ RETRY_LANE_STRING } )` ,
213216 'log: <Example/>' ,
214- ' groupEnd: ⚛️ render (0b0000000010000000000000000000000)' ,
217+ ` groupEnd: ⚛️ render (${ RETRY_LANE_STRING } )` ,
215218 ] ) ;
216219 } ) ;
217220
@@ -241,11 +244,11 @@ describe('DebugTracing', () => {
241244 expect ( Scheduler ) . toFlushUntilNextPaint ( [ ] ) ;
242245
243246 expect ( logs ) . toEqual ( [
244- ' group: ⚛️ commit (0b0000000000000000000001000000000)' ,
245- ' group: ⚛️ layout effects (0b0000000000000000000001000000000)' ,
247+ ` group: ⚛️ commit (${ DEFAULT_LANE_STRING } )` ,
248+ ` group: ⚛️ layout effects (${ DEFAULT_LANE_STRING } )` ,
246249 'log: ⚛️ Example updated state (0b0000000000000000000000000000001)' ,
247- ' groupEnd: ⚛️ layout effects (0b0000000000000000000001000000000)' ,
248- ' groupEnd: ⚛️ commit (0b0000000000000000000001000000000)' ,
250+ ` groupEnd: ⚛️ layout effects (${ DEFAULT_LANE_STRING } )` ,
251+ ` groupEnd: ⚛️ commit (${ DEFAULT_LANE_STRING } )` ,
249252 ] ) ;
250253 } ) ;
251254
@@ -277,10 +280,10 @@ describe('DebugTracing', () => {
277280 } ) . toErrorDev ( 'Cannot update during an existing state transition' ) ;
278281
279282 expect ( logs ) . toEqual ( [
280- ' group: ⚛️ render (0b0000000000000000000001000000000)' ,
281- ' log: ⚛️ Example updated state (0b0000000000000000000001000000000)' ,
282- ' log: ⚛️ Example updated state (0b0000000000000000000001000000000)' ,
283- ' groupEnd: ⚛️ render (0b0000000000000000000001000000000)' ,
283+ ` group: ⚛️ render (${ DEFAULT_LANE_STRING } )` ,
284+ ` log: ⚛️ Example updated state (${ DEFAULT_LANE_STRING } )` ,
285+ ` log: ⚛️ Example updated state (${ DEFAULT_LANE_STRING } )` ,
286+ ` groupEnd: ⚛️ render (${ DEFAULT_LANE_STRING } )` ,
284287 ] ) ;
285288 } ) ;
286289
@@ -308,11 +311,11 @@ describe('DebugTracing', () => {
308311 expect ( Scheduler ) . toFlushUntilNextPaint ( [ ] ) ;
309312
310313 expect ( logs ) . toEqual ( [
311- ' group: ⚛️ commit (0b0000000000000000000001000000000)' ,
312- ' group: ⚛️ layout effects (0b0000000000000000000001000000000)' ,
314+ ` group: ⚛️ commit (${ DEFAULT_LANE_STRING } )` ,
315+ ` group: ⚛️ layout effects (${ DEFAULT_LANE_STRING } )` ,
313316 'log: ⚛️ Example updated state (0b0000000000000000000000000000001)' ,
314- ' groupEnd: ⚛️ layout effects (0b0000000000000000000001000000000)' ,
315- ' groupEnd: ⚛️ commit (0b0000000000000000000001000000000)' ,
317+ ` groupEnd: ⚛️ layout effects (${ DEFAULT_LANE_STRING } )` ,
318+ ` groupEnd: ⚛️ commit (${ DEFAULT_LANE_STRING } )` ,
316319 ] ) ;
317320 } ) ;
318321
@@ -335,9 +338,9 @@ describe('DebugTracing', () => {
335338 ) ;
336339 } ) ;
337340 expect ( logs ) . toEqual ( [
338- ' group: ⚛️ passive effects (0b0000000000000000000001000000000)' ,
339- ' log: ⚛️ Example updated state (0b0000000000000000000001000000000)' ,
340- ' groupEnd: ⚛️ passive effects (0b0000000000000000000001000000000)' ,
341+ ` group: ⚛️ passive effects (${ DEFAULT_LANE_STRING } )` ,
342+ ` log: ⚛️ Example updated state (${ DEFAULT_LANE_STRING } )` ,
343+ ` groupEnd: ⚛️ passive effects (${ DEFAULT_LANE_STRING } )` ,
341344 ] ) ;
342345 } ) ;
343346
@@ -361,10 +364,10 @@ describe('DebugTracing', () => {
361364 } ) ;
362365
363366 expect ( logs ) . toEqual ( [
364- ' group: ⚛️ render (0b0000000000000000000001000000000)' ,
365- ' log: ⚛️ Example updated state (0b0000000000000000000001000000000)' ,
366- ' log: ⚛️ Example updated state (0b0000000000000000000001000000000)' , // debugRenderPhaseSideEffectsForStrictMode
367- ' groupEnd: ⚛️ render (0b0000000000000000000001000000000)' ,
367+ ` group: ⚛️ render (${ DEFAULT_LANE_STRING } )` ,
368+ ` log: ⚛️ Example updated state (${ DEFAULT_LANE_STRING } )` ,
369+ ` log: ⚛️ Example updated state (${ DEFAULT_LANE_STRING } )` , // debugRenderPhaseSideEffectsForStrictMode
370+ ` groupEnd: ⚛️ render (${ DEFAULT_LANE_STRING } )` ,
368371 ] ) ;
369372 } ) ;
370373
@@ -389,9 +392,9 @@ describe('DebugTracing', () => {
389392 expect ( Scheduler ) . toFlushUntilNextPaint ( [ ] ) ;
390393
391394 expect ( logs ) . toEqual ( [
392- ' group: ⚛️ render (0b0000000000000000000001000000000)' ,
395+ ` group: ⚛️ render (${ DEFAULT_LANE_STRING } )` ,
393396 'log: Hello from user code' ,
394- ' groupEnd: ⚛️ render (0b0000000000000000000001000000000)' ,
397+ ` groupEnd: ⚛️ render (${ DEFAULT_LANE_STRING } )` ,
395398 ] ) ;
396399 } ) ;
397400
0 commit comments