react/scripts
Ruslan Lesiutin c8deb5db66
fix[ci]: fixed jest configuration not to skip too many devtools tests (#26955)
## Summary
Running `yarn test --project devtools --build` currently skips all
non-gated (without `@reactVersion` directives) devtools tests. This is
not expected behaviour, these changes are fixing it.

There were multiple related PRs to it:
- https://github.com/facebook/react/pull/26742
- https://github.com/facebook/react/pull/25712
- https://github.com/facebook/react/pull/24555

With these changes, the resulting behaviour will be:
- If `REACT_VERSION` env variable is specified:
    - jest will not include all non-gated test cases in the test run
- jest will run only a specific test case, when specified
`REACT_VERSION` value satisfies the range defined by `@reactVersion`
directives for this test case

- If `REACT_VERSION` env variable is not specified, jest will run all
non-gated tests:
   - jest will include all non-gated test cases in the test run
- jest will run all non-gated test cases, the only skipped test cases
will be those, which specified the range that does not include the next
stable version of react, which will be imported from `ReactVersions.js`

## How did you test this change?
Running `profilingCache` test suite without specifying `reactVersion`
now skips gated (>= 17 & < 18) test
<img width="1447" alt="Screenshot 2023-06-15 at 11 18 22"
src="https://github.com/facebook/react/assets/28902667/cad58994-2cb3-44b3-9eb2-1699c01a1eb3">

Running `profilingCache` test suite with specifying `reactVersion` to
`17` now runs this test case and skips others correctly
<img width="1447" alt="Screenshot 2023-06-15 at 11 20 11"
src="https://github.com/facebook/react/assets/28902667/d308960a-c172-4422-ba6f-9c0dbcd6f7d5">

Running `yarn test --project devtools ...` without specifying
`reactVersion` now runs all non-gated test cases
<img width="398" alt="Screenshot 2023-06-15 at 12 25 12"
src="https://github.com/facebook/react/assets/28902667/2b329634-0efd-4c4c-b460-889696bbc9e1">

Running `yarn test --project devtools ...` with specifying
`reactVersion` (to `17` in this example) now includes only gated tests
<img width="414" alt="Screenshot 2023-06-15 at 12 26 31"
src="https://github.com/facebook/react/assets/28902667/a702c27e-4c35-4b12-834c-e5bb06728997">
2023-06-22 09:33:05 +01:00
..
babel fix[ci]: fixed jest configuration not to skip too many devtools tests (#26955) 2023-06-22 09:33:05 +01:00
bench Upgrade prettier (#26081) 2023-01-31 08:25:05 -05:00
circleci chore[devtools]: upgrade to webpack v5 (#26887) 2023-06-14 13:15:52 +01:00
devtools chore[devtools/release-scripts]: update messages / fixed npm view com… (#26660) 2023-04-19 10:05:16 +01:00
error-codes [Flight] Progressively Enhanced Server Actions (#26774) 2023-05-03 18:36:57 -04:00
eslint [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
eslint-rules Upgrade prettier (#26081) 2023-01-31 08:25:05 -05:00
flow [flow] upgrade to 0.209.0 (#26958) 2023-06-16 09:57:03 -04:00
git Remove leftover env variable logic in pre-commit hook 2015-09-01 14:35:47 -07:00
jest fix[ci]: fixed jest configuration not to skip too many devtools tests (#26955) 2023-06-22 09:33:05 +01:00
perf-counters [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
prettier Upgrade prettier (#26081) 2023-01-31 08:25:05 -05:00
print-warnings Upgrade prettier (#26081) 2023-01-31 08:25:05 -05:00
release [Release Script] Print a hint where to get the token (#26783) 2023-05-05 20:08:14 +01:00
rollup [Flight] Add bundler-less version of RSC using plain ESM (#26889) 2023-06-03 15:58:24 -04:00
shared [Flight] Add bundler-less version of RSC using plain ESM (#26889) 2023-06-03 15:58:24 -04:00
tasks Bug: yarn flow dom does not exist, so console should suggest yarn flow dom-node (#26213) 2023-02-21 21:30:34 +01:00
authors AUTHORS 2013-09-09 23:42:54 -07:00