mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
See https://github.com/vercel/next.js/pull/95553 for an explanation of why we want to split these up. TL;DR it makes CI faster and saves us some money. In CI we have to run tests at the suite/file granularity, so if a test suite is too long it limits parallelism and if it has to be retried, we have to retry the full suite.
30 lines
726 B
TypeScript
30 lines
726 B
TypeScript
import {
|
|
registerInvalidReactApiTests,
|
|
runRscBuildErrorsTests,
|
|
} from './rsc-build-errors.util'
|
|
|
|
// The full list of invalid react APIs is split between the two
|
|
// rsc-build-errors-react-apis-*.test.ts entries to balance CI shard times.
|
|
const invalidReactServerApis = [
|
|
'useLayoutEffect',
|
|
'useReducer',
|
|
'useRef',
|
|
'useState',
|
|
'useSyncExternalStore',
|
|
'useTransition',
|
|
'useOptimistic',
|
|
'useActionState',
|
|
]
|
|
|
|
const invalidReactDomServerApis = [
|
|
'flushSync',
|
|
'unstable_batchedUpdates',
|
|
'useFormStatus',
|
|
'useFormState',
|
|
]
|
|
|
|
runRscBuildErrorsTests((ctx) => {
|
|
registerInvalidReactApiTests(ctx, 'react', invalidReactServerApis)
|
|
registerInvalidReactApiTests(ctx, 'react-dom', invalidReactDomServerApis)
|
|
})
|