Skip to content

Commit

Permalink
fix[devtools/ci]: split profiling cache test for different react vers…
Browse files Browse the repository at this point in the history
…ions and toEqual checker (#28628)

This should fix the failing backwards-compatibility tests on CI:
-
https://app.circleci.com/pipelines/github/facebook/react/51347/workflows/9d319db5-7a29-4e9a-a3a0-8d49a24ee9bd/jobs/809381
-
https://app.circleci.com/pipelines/github/facebook/react/51347/workflows/9d319db5-7a29-4e9a-a3a0-8d49a24ee9bd/jobs/809386

Started failing after #27991.

Brief summary:
1. Revert changes to `profilingCache-test` in
#27991.
2. Scope previous test to react versions 16.9 - 18.2
3. Add a new test for react versions > 18.2 (includes testing react from
souce), which is also gated with `!disableLegacyContext`.

> [!IMPORTANT]
> `@gate` pragma expects the test to throw. Jest doesn't throw any
exceptions when snapshots are mismatched, this is why I've migrated test
from `toMatchInlineSnapshot` checker to `toEqual`.
> If the test doesn't throw, we will fail it manually:
>
https://github.com/facebook/react/blob/5a75f9e78544fa6d052aff7fe99607e48f35b979/scripts/jest/setupTests.js#L291-L295
  • Loading branch information
hoxyq authored Mar 26, 2024
1 parent 07def0c commit 75de4ff
Showing 1 changed file with 386 additions and 21 deletions.
Loading

0 comments on commit 75de4ff

Please sign in to comment.