Skip to content

Commit ff31f63

Browse files
committed
Gate DevTools test to fix CI
This test started failing recently in older versions of React because the Scheduler priority inside a microtask is Normal instead of Immediate. This is expected because microtasks are not Scheduler tasks; it's an implementation detail. I gated the test to only run in the older versions of React, because it's a regression test for the legacy Suspense renderer. So it doesn't really need to run for new versions, because the legacy renderer is deprecated and will soon be removed. Test plan: ``` yarn test --build --project devtools --release-channel=experimental --reactVersion 18.0 --watch ```
1 parent 18282f8 commit ff31f63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-devtools-shared/src/__tests__/profilingCache-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ describe('ProfilingCache', () => {
938938
}
939939
});
940940

941-
// @reactVersion >= 18.0
941+
// @reactVersion < 18.2
942942
it('should handle unexpectedly shallow suspense trees', () => {
943943
const container = document.createElement('div');
944944

@@ -963,7 +963,7 @@ describe('ProfilingCache', () => {
963963
2 => 0,
964964
},
965965
"passiveEffectDuration": null,
966-
"priorityLevel": "Normal",
966+
"priorityLevel": "Immediate",
967967
"timestamp": 0,
968968
"updaters": [
969969
{

0 commit comments

Comments
 (0)