@@ -1643,7 +1643,7 @@ describe(`onCommit`, () => {
1643
1643
expect ( call ) . toHaveLength ( 4 ) ;
1644
1644
expect ( call [ 0 ] ) . toBe ( 'root-update' ) ;
1645
1645
expect ( call [ 1 ] ) . toBe ( 'update' ) ;
1646
- expect ( call [ 2 ] ) . toBe ( 1100 ) ; // durations
1646
+ expect ( call [ 2 ] ) . toBe ( 11100 ) ; // durations
1647
1647
expect ( call [ 3 ] ) . toBe ( 1124 ) ; // commit start time (before mutations or effects)
1648
1648
} ) ;
1649
1649
@@ -1952,11 +1952,7 @@ describe(`onPostCommit`, () => {
1952
1952
expect ( call ) . toHaveLength ( 4 ) ;
1953
1953
expect ( call [ 0 ] ) . toBe ( 'unmount-test' ) ;
1954
1954
expect ( call [ 1 ] ) . toBe ( 'update' ) ;
1955
- // TODO (bvaughn) The duration reported below should be 10100, but is 0
1956
- // by the time the passive effect is flushed its parent Fiber pointer is gone.
1957
- // If we refactor to preserve the unmounted Fiber tree we could fix this.
1958
- // The current implementation would require too much extra overhead to track this.
1959
- expect ( call [ 2 ] ) . toBe ( 0 ) ; // durations
1955
+ expect ( call [ 2 ] ) . toBe ( 10100 ) ; // durations
1960
1956
expect ( call [ 3 ] ) . toBe ( 12030 ) ; // commit start time (before mutations or effects)
1961
1957
} ) ;
1962
1958
@@ -2085,7 +2081,7 @@ describe(`onPostCommit`, () => {
2085
2081
expect ( call ) . toHaveLength ( 4 ) ;
2086
2082
expect ( call [ 0 ] ) . toBe ( 'root-update' ) ;
2087
2083
expect ( call [ 1 ] ) . toBe ( 'update' ) ;
2088
- expect ( call [ 2 ] ) . toBe ( 1100 ) ; // durations
2084
+ expect ( call [ 2 ] ) . toBe ( 11100 ) ; // durations
2089
2085
expect ( call [ 3 ] ) . toBe ( 1124 ) ; // commit start time (before mutations or effects)
2090
2086
} ) ;
2091
2087
@@ -2300,7 +2296,7 @@ describe(`onPostCommit`, () => {
2300
2296
expect ( call ) . toHaveLength ( 4 ) ;
2301
2297
expect ( call [ 0 ] ) . toBe ( 'root' ) ;
2302
2298
expect ( call [ 1 ] ) . toBe ( 'update' ) ;
2303
- expect ( call [ 2 ] ) . toBe ( 100000000 ) ; // durations
2299
+ expect ( call [ 2 ] ) . toBe ( 100001000 ) ; // durations
2304
2300
// The commit time varies because the above duration time varies
2305
2301
expect ( call [ 3 ] ) . toBe ( 11221221 ) ; // commit start time (before mutations or effects)
2306
2302
} ) ;
0 commit comments