@@ -162,7 +162,7 @@ describe('useId', () => {
`);
});
- test('indirections', async () => {
+ it('indirections', async () => {
function App() {
// There are no forks in this tree, but the parent and the child should
// have different ids.
@@ -207,7 +207,7 @@ describe('useId', () => {
`);
});
- test('StrictMode double rendering', async () => {
+ it('StrictMode double rendering', async () => {
const {StrictMode} = React;
function App() {
@@ -236,7 +236,7 @@ describe('useId', () => {
`);
});
- test('empty (null) children', async () => {
+ it('empty (null) children', async () => {
// We don't treat empty children different from non-empty ones, which means
// they get allocated a slot when generating ids. There's no inherent reason
// to do this; Fiber happens to allocate a fiber for null children that
@@ -275,7 +275,7 @@ describe('useId', () => {
`);
});
- test('large ids', async () => {
+ it('large ids', async () => {
// The component in this test outputs a recursive tree of nodes with ids,
// where the underlying binary representation is an alternating series of 1s
// and 0s. In other words, they are all of the form 101010101.
@@ -325,7 +325,7 @@ describe('useId', () => {
}
});
- test('multiple ids in a single component', async () => {
+ it('multiple ids in a single component', async () => {
function App() {
const id1 = useId();
const id2 = useId();
@@ -350,7 +350,7 @@ describe('useId', () => {
`);
});
- test('local render phase updates', async () => {
+ it('local render phase updates', async () => {
function App({swap}) {
const [count, setCount] = useState(0);
if (count < 3) {
@@ -375,7 +375,7 @@ describe('useId', () => {
`);
});
- test('basic incremental hydration', async () => {
+ it('basic incremental hydration', async () => {
function App() {
return (
@@ -416,7 +416,7 @@ describe('useId', () => {
`);
});
- test('inserting/deleting siblings outside a dehydrated Suspense boundary', async () => {
+ it('inserting/deleting siblings outside a dehydrated Suspense boundary', async () => {
const span = React.createRef(null);
function App({swap}) {
// Note: Using a dynamic array so these are treated as insertions and
@@ -500,7 +500,7 @@ describe('useId', () => {
expect(span.current).toBe(dehydratedSpan);
});
- test('inserting/deleting siblings inside a dehydrated Suspense boundary', async () => {
+ it('inserting/deleting siblings inside a dehydrated Suspense boundary', async () => {
const span = React.createRef(null);
function App({swap}) {
// Note: Using a dynamic array so these are treated as insertions and
@@ -575,7 +575,7 @@ describe('useId', () => {
expect(span.current).toBe(dehydratedSpan);
});
- test('identifierPrefix option', async () => {
+ it('identifierPrefix option', async () => {
function Child() {
const id = useId();
return
{id}
;
diff --git a/packages/react-dom/src/__tests__/ReactLegacyRootWarnings-test.js b/packages/react-dom/src/__tests__/ReactLegacyRootWarnings-test.js
index 1eef3d140e325..5c6eb4e03311a 100644
--- a/packages/react-dom/src/__tests__/ReactLegacyRootWarnings-test.js
+++ b/packages/react-dom/src/__tests__/ReactLegacyRootWarnings-test.js
@@ -14,7 +14,7 @@ describe('ReactDOMRoot', () => {
});
// @gate !disableLegacyMode
- test('deprecation warning for ReactDOM.render', () => {
+ it('deprecation warning for ReactDOM.render', () => {
spyOnDev(console, 'error');
ReactDOM.render('Hi', container);
diff --git a/packages/react-dom/src/__tests__/ReactStartTransitionMultipleRenderers-test.js b/packages/react-dom/src/__tests__/ReactStartTransitionMultipleRenderers-test.js
index 5318cc91fb26b..ccff2abf36439 100644
--- a/packages/react-dom/src/__tests__/ReactStartTransitionMultipleRenderers-test.js
+++ b/packages/react-dom/src/__tests__/ReactStartTransitionMultipleRenderers-test.js
@@ -95,7 +95,7 @@ describe('ReactStartTransitionMultipleRenderers', () => {
// built, it only works when running tests using the actual build artifacts,
// not the source files.
// @gate !source
- test('React.startTransition works across multiple renderers', async () => {
+ it('React.startTransition works across multiple renderers', async () => {
const ReactNoop = require('react-noop-renderer');
const setIsPendings = new Set();
diff --git a/packages/react-dom/src/__tests__/ReactTestUtilsActUnmockedScheduler-test.js b/packages/react-dom/src/__tests__/ReactTestUtilsActUnmockedScheduler-test.js
index 45babfd4032d3..d526344ddda9d 100644
--- a/packages/react-dom/src/__tests__/ReactTestUtilsActUnmockedScheduler-test.js
+++ b/packages/react-dom/src/__tests__/ReactTestUtilsActUnmockedScheduler-test.js
@@ -43,7 +43,7 @@ afterEach(() => {
});
// @gate __DEV__
-it('can use act to flush effects', async () => {
+test('can use act to flush effects', async () => {
function App() {
React.useEffect(() => {
yields.push(100);
@@ -60,7 +60,7 @@ it('can use act to flush effects', async () => {
});
// @gate __DEV__
-it('flushes effects on every call', async () => {
+test('flushes effects on every call', async () => {
function App() {
const [ctr, setCtr] = React.useState(0);
React.useEffect(() => {
@@ -100,7 +100,7 @@ it('flushes effects on every call', async () => {
});
// @gate __DEV__
-it("should keep flushing effects until they're done", async () => {
+test("should keep flushing effects until they're done", async () => {
function App() {
const [ctr, setCtr] = React.useState(0);
React.useEffect(() => {
@@ -120,7 +120,7 @@ it("should keep flushing effects until they're done", async () => {
});
// @gate __DEV__
-it('should flush effects only on exiting the outermost act', async () => {
+test('should flush effects only on exiting the outermost act', async () => {
function App() {
React.useEffect(() => {
yields.push(0);
@@ -142,7 +142,7 @@ it('should flush effects only on exiting the outermost act', async () => {
});
// @gate __DEV__
-it('can handle cascading promises', async () => {
+test('can handle cascading promises', async () => {
// this component triggers an effect, that waits a tick,
// then sets state. repeats this 5 times.
function App() {
diff --git a/packages/react-dom/src/events/__tests__/SyntheticFocusEvent-test.js b/packages/react-dom/src/events/__tests__/SyntheticFocusEvent-test.js
index ef889c4b60d10..3fdf37b578932 100644
--- a/packages/react-dom/src/events/__tests__/SyntheticFocusEvent-test.js
+++ b/packages/react-dom/src/events/__tests__/SyntheticFocusEvent-test.js
@@ -28,7 +28,7 @@ describe('SyntheticFocusEvent', () => {
container = null;
});
- test('onFocus events have the focus type', async () => {
+ it('onFocus events have the focus type', async () => {
const log = [];
const root = ReactDOMClient.createRoot(container);
await act(() => {
@@ -54,7 +54,7 @@ describe('SyntheticFocusEvent', () => {
expect(log).toEqual(['onFocusCapture: focus', 'onFocus: focus']);
});
- test('onBlur events have the blur type', async () => {
+ it('onBlur events have the blur type', async () => {
const log = [];
const root = ReactDOMClient.createRoot(container);
await act(() => {
diff --git a/packages/react-dom/src/events/plugins/__tests__/EnterLeaveEventPlugin-test.js b/packages/react-dom/src/events/plugins/__tests__/EnterLeaveEventPlugin-test.js
index b25d6bd3ed66a..d0b4d1cbd09c8 100644
--- a/packages/react-dom/src/events/plugins/__tests__/EnterLeaveEventPlugin-test.js
+++ b/packages/react-dom/src/events/plugins/__tests__/EnterLeaveEventPlugin-test.js
@@ -295,7 +295,7 @@ describe('EnterLeaveEventPlugin', () => {
expect(onMouseLeave).toHaveBeenCalledTimes(1);
});
- it('should work with portals that have onMouseEnter outside of the root ', async () => {
+ it('should work with portals that have onMouseEnter outside of the root', async () => {
const divRef = React.createRef();
const otherDivRef = React.createRef();
const onMouseEnter = jest.fn();
diff --git a/packages/react-dom/src/events/plugins/__tests__/SimpleEventPlugin-test.js b/packages/react-dom/src/events/plugins/__tests__/SimpleEventPlugin-test.js
index 4b181325ab488..062762e776a56 100644
--- a/packages/react-dom/src/events/plugins/__tests__/SimpleEventPlugin-test.js
+++ b/packages/react-dom/src/events/plugins/__tests__/SimpleEventPlugin-test.js
@@ -139,8 +139,9 @@ describe('SimpleEventPlugin', function () {
expect(onClick).toHaveBeenCalledTimes(1);
});
- ['button', 'input', 'select', 'textarea'].forEach(function (tagName) {
- describe(tagName, function () {
+ describe.each(['button', 'input', 'select', 'textarea'])(
+ '%s',
+ function (tagName) {
it('should forward clicks when it starts out not disabled', async () => {
const element = React.createElement(tagName, {
onClick: onClick,
@@ -207,8 +208,8 @@ describe('SimpleEventPlugin', function () {
const element = container.firstChild;
await expectClickThru(element);
});
- });
- });
+ },
+ );
it('batches updates that occur as a result of a nested event dispatch', async () => {
container = document.createElement('div');
diff --git a/packages/react-native-renderer/src/__tests__/ReactNativeEvents-test.internal.js b/packages/react-native-renderer/src/__tests__/ReactNativeEvents-test.internal.js
index fac0b8b5c3800..ed0521bedef9f 100644
--- a/packages/react-native-renderer/src/__tests__/ReactNativeEvents-test.internal.js
+++ b/packages/react-native-renderer/src/__tests__/ReactNativeEvents-test.internal.js
@@ -80,7 +80,7 @@ beforeEach(() => {
});
// @gate !disableLegacyMode
-it('fails to register the same event name with different types', async () => {
+test('fails to register the same event name with different types', async () => {
const InvalidEvents = createReactNativeComponentClass('InvalidEvents', () => {
if (!__DEV__) {
// Simulate a registration error in prod.
@@ -124,7 +124,7 @@ it('fails to register the same event name with different types', async () => {
});
// @gate !disableLegacyMode
-it('fails if unknown/unsupported event types are dispatched', () => {
+test('fails if unknown/unsupported event types are dispatched', () => {
expect(RCTEventEmitter.register).toHaveBeenCalledTimes(1);
const EventEmitter = RCTEventEmitter.register.mock.calls[0][0];
const View = fakeRequireNativeComponent('View', {});
@@ -149,7 +149,7 @@ it('fails if unknown/unsupported event types are dispatched', () => {
});
// @gate !disableLegacyMode
-it('handles events', () => {
+test('handles events', () => {
expect(RCTEventEmitter.register).toHaveBeenCalledTimes(1);
const EventEmitter = RCTEventEmitter.register.mock.calls[0][0];
const View = fakeRequireNativeComponent('View', {foo: true});
@@ -211,7 +211,7 @@ it('handles events', () => {
// @gate !disableLegacyContext || !__DEV__
// @gate !disableLegacyMode
-it('handles events on text nodes', () => {
+test('handles events on text nodes', () => {
expect(RCTEventEmitter.register).toHaveBeenCalledTimes(1);
const EventEmitter = RCTEventEmitter.register.mock.calls[0][0];
const Text = fakeRequireNativeComponent('RCTText', {});
@@ -295,7 +295,7 @@ it('handles events on text nodes', () => {
});
// @gate !disableLegacyMode
-it('handles when a responder is unmounted while a touch sequence is in progress', () => {
+test('handles when a responder is unmounted while a touch sequence is in progress', () => {
const EventEmitter = RCTEventEmitter.register.mock.calls[0][0];
const View = fakeRequireNativeComponent('View', {id: true});
@@ -385,7 +385,7 @@ it('handles when a responder is unmounted while a touch sequence is in progress'
});
// @gate !disableLegacyMode
-it('handles events without target', () => {
+test('handles events without target', () => {
const EventEmitter = RCTEventEmitter.register.mock.calls[0][0];
const View = fakeRequireNativeComponent('View', {id: true});
@@ -476,7 +476,7 @@ it('handles events without target', () => {
});
// @gate !disableLegacyMode
-it('dispatches event with target as instance', () => {
+test('dispatches event with target as instance', () => {
const EventEmitter = RCTEventEmitter.register.mock.calls[0][0];
const View = fakeRequireNativeComponent('View', {id: true});
diff --git a/packages/react-reconciler/src/__tests__/Activity-test.js b/packages/react-reconciler/src/__tests__/Activity-test.js
index 65546609ccaa7..c12d49a85ce76 100644
--- a/packages/react-reconciler/src/__tests__/Activity-test.js
+++ b/packages/react-reconciler/src/__tests__/Activity-test.js
@@ -1241,6 +1241,7 @@ describe('Activity', () => {
// either an option or a heuristic to mount passive effects inside a hidden
// tree after a delay.
// @gate enableActivity
+ // eslint-disable-next-line jest/no-disabled-tests
it.skip("don't defer passive effects when prerendering in a tree whose effects are already connected", async () => {
function Child({label}) {
useEffect(() => {
diff --git a/packages/react-reconciler/src/__tests__/ActivitySuspense-test.js b/packages/react-reconciler/src/__tests__/ActivitySuspense-test.js
index 473ae5538174a..d02ae70e523ca 100644
--- a/packages/react-reconciler/src/__tests__/ActivitySuspense-test.js
+++ b/packages/react-reconciler/src/__tests__/ActivitySuspense-test.js
@@ -99,7 +99,7 @@ describe('Activity Suspense', () => {
}
// @gate enableActivity
- test('basic example of suspending inside hidden tree', async () => {
+ it('basic example of suspending inside hidden tree', async () => {
const root = ReactNoop.createRoot();
function App() {
diff --git a/packages/react-reconciler/src/__tests__/ReactActWarnings-test.js b/packages/react-reconciler/src/__tests__/ReactActWarnings-test.js
index 61cde5648a9e6..03e04e8b1dc40 100644
--- a/packages/react-reconciler/src/__tests__/ReactActWarnings-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactActWarnings-test.js
@@ -150,7 +150,7 @@ describe('act warnings', () => {
}
}
- test('warns about unwrapped updates only if environment flag is enabled', async () => {
+ it('warns about unwrapped updates only if environment flag is enabled', async () => {
let setState;
function App() {
const [state, _setState] = useState(0);
@@ -187,7 +187,7 @@ describe('act warnings', () => {
});
// @gate __DEV__
- test('act warns if the environment flag is not enabled', async () => {
+ it('act warns if the environment flag is not enabled', async () => {
let setState;
function App() {
const [state, _setState] = useState(0);
@@ -237,7 +237,7 @@ describe('act warnings', () => {
});
});
- test('warns if root update is not wrapped', async () => {
+ it('warns if root update is not wrapped', async () => {
await withActEnvironment(true, () => {
const root = ReactNoop.createRoot();
expect(() => root.render('Hi')).toErrorDev(
@@ -250,7 +250,7 @@ describe('act warnings', () => {
});
// @gate __DEV__
- test('warns if class update is not wrapped', async () => {
+ it('warns if class update is not wrapped', async () => {
let app;
class App extends React.Component {
state = {count: 0};
@@ -272,7 +272,7 @@ describe('act warnings', () => {
});
// @gate __DEV__
- test('warns even if update is synchronous', async () => {
+ it('warns even if update is synchronous', async () => {
let setState;
function App() {
const [state, _setState] = useState(0);
@@ -299,7 +299,7 @@ describe('act warnings', () => {
// @gate __DEV__
// @gate enableLegacyCache
- test('warns if Suspense retry is not wrapped', async () => {
+ it('warns if Suspense retry is not wrapped', async () => {
function App() {
return (
}>
@@ -327,7 +327,7 @@ describe('act warnings', () => {
// @gate __DEV__
// @gate enableLegacyCache
- test('warns if Suspense ping is not wrapped', async () => {
+ it('warns if Suspense ping is not wrapped', async () => {
function App({showMore}) {
return (
}>
diff --git a/packages/react-reconciler/src/__tests__/ReactAsyncActions-test.js b/packages/react-reconciler/src/__tests__/ReactAsyncActions-test.js
index f7faf79aaa7da..ad4c2d5e9737a 100644
--- a/packages/react-reconciler/src/__tests__/ReactAsyncActions-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactAsyncActions-test.js
@@ -122,7 +122,7 @@ describe('ReactAsyncActions', () => {
}
// @gate enableAsyncActions
- test('isPending remains true until async action finishes', async () => {
+ it('isPending remains true until async action finishes', async () => {
let startTransition;
function App() {
const [isPending, _start] = useTransition();
@@ -155,7 +155,7 @@ describe('ReactAsyncActions', () => {
});
// @gate enableAsyncActions
- test('multiple updates in an async action scope are entangled together', async () => {
+ it('multiple updates in an async action scope are entangled together', async () => {
let startTransition;
function App({text}) {
const [isPending, _start] = useTransition();
@@ -211,7 +211,7 @@ describe('ReactAsyncActions', () => {
});
// @gate enableAsyncActions
- test('multiple async action updates in the same scope are entangled together', async () => {
+ it('multiple async action updates in the same scope are entangled together', async () => {
let setStepA;
function A() {
const [step, setStep] = useState(0);
@@ -337,7 +337,7 @@ describe('ReactAsyncActions', () => {
});
// @gate enableAsyncActions
- test('urgent updates are not blocked during an async action', async () => {
+ it('urgent updates are not blocked during an async action', async () => {
let setStepA;
function A() {
const [step, setStep] = useState(0);
@@ -418,7 +418,7 @@ describe('ReactAsyncActions', () => {
});
// @gate enableAsyncActions
- test("if a sync action throws, it's rethrown from the `useTransition`", async () => {
+ it("if a sync action throws, it's rethrown from the `useTransition`", async () => {
class ErrorBoundary extends React.Component {
state = {error: null};
static getDerivedStateFromError(error) {
@@ -460,7 +460,7 @@ describe('ReactAsyncActions', () => {
});
// @gate enableAsyncActions
- test("if an async action throws, it's rethrown from the `useTransition`", async () => {
+ it("if an async action throws, it's rethrown from the `useTransition`", async () => {
class ErrorBoundary extends React.Component {
state = {error: null};
static getDerivedStateFromError(error) {
@@ -508,7 +508,7 @@ describe('ReactAsyncActions', () => {
});
// @gate !enableAsyncActions
- test('when enableAsyncActions is disabled, and a sync action throws, `isPending` is turned off', async () => {
+ it('when enableAsyncActions is disabled, and a sync action throws, `isPending` is turned off', async () => {
let startTransition;
function App() {
const [isPending, _start] = useTransition();
@@ -535,7 +535,7 @@ describe('ReactAsyncActions', () => {
});
// @gate enableAsyncActions
- test('if there are multiple entangled actions, and one of them errors, it only affects that action', async () => {
+ it('if there are multiple entangled actions, and one of them errors, it only affects that action', async () => {
class ErrorBoundary extends React.Component {
state = {error: null};
static getDerivedStateFromError(error) {
@@ -652,7 +652,7 @@ describe('ReactAsyncActions', () => {
});
// @gate enableAsyncActions
- test('useOptimistic can be used to implement a pending state', async () => {
+ it('useOptimistic can be used to implement a pending state', async () => {
const startTransition = React.startTransition;
let setIsPending;
@@ -702,7 +702,7 @@ describe('ReactAsyncActions', () => {
});
// @gate enableAsyncActions
- test('useOptimistic rebases pending updates on top of passthrough value', async () => {
+ it('useOptimistic rebases pending updates on top of passthrough value', async () => {
let serverCart = ['A'];
async function submitNewItem(item) {
@@ -823,7 +823,7 @@ describe('ReactAsyncActions', () => {
});
// @gate enableAsyncActions
- test(
+ it(
'regression: when there are no pending transitions, useOptimistic should ' +
'always return the passthrough value',
async () => {
@@ -869,7 +869,7 @@ describe('ReactAsyncActions', () => {
);
// @gate enableAsyncActions
- test('regression: useOptimistic during setState-in-render', async () => {
+ it('regression: useOptimistic during setState-in-render', async () => {
// This is a regression test for a very specific case where useOptimistic is
// the first hook in the component, it has a pending update, and a later
// hook schedules a local (setState-in-render) update. Don't sweat about
@@ -907,7 +907,7 @@ describe('ReactAsyncActions', () => {
});
// @gate enableAsyncActions
- test('useOptimistic accepts a custom reducer', async () => {
+ it('useOptimistic accepts a custom reducer', async () => {
let serverCart = ['A'];
async function submitNewItem(item) {
@@ -1039,7 +1039,7 @@ describe('ReactAsyncActions', () => {
});
// @gate enableAsyncActions
- test('useOptimistic rebases if the passthrough is updated during a render phase update', async () => {
+ it('useOptimistic rebases if the passthrough is updated during a render phase update', async () => {
// This is kind of an esoteric case where it's hard to come up with a
// realistic real-world scenario but it should still work.
let increment;
@@ -1124,7 +1124,7 @@ describe('ReactAsyncActions', () => {
});
// @gate enableAsyncActions
- test('useOptimistic rebases if the passthrough is updated during a render phase update (initial mount)', async () => {
+ it('useOptimistic rebases if the passthrough is updated during a render phase update (initial mount)', async () => {
// This is kind of an esoteric case where it's hard to come up with a
// realistic real-world scenario but it should still work.
function App() {
@@ -1164,7 +1164,7 @@ describe('ReactAsyncActions', () => {
});
// @gate enableAsyncActions
- test('useOptimistic can update repeatedly in the same async action', async () => {
+ it('useOptimistic can update repeatedly in the same async action', async () => {
let startTransition;
let setLoadingProgress;
let setText;
@@ -1228,7 +1228,7 @@ describe('ReactAsyncActions', () => {
});
// @gate enableAsyncActions
- test('useOptimistic warns if outside of a transition', async () => {
+ it('useOptimistic warns if outside of a transition', async () => {
let startTransition;
let setLoadingProgress;
let setText;
@@ -1276,7 +1276,7 @@ describe('ReactAsyncActions', () => {
});
// @gate enableAsyncActions
- test(
+ it(
'optimistic state is not reverted until async action finishes, even if ' +
'useTransition hook is unmounted',
async () => {
@@ -1379,7 +1379,7 @@ describe('ReactAsyncActions', () => {
);
// @gate enableAsyncActions
- test(
+ it(
'updates in an async action are entangled even if useTransition hook ' +
'is unmounted before it finishes',
async () => {
@@ -1467,7 +1467,7 @@ describe('ReactAsyncActions', () => {
);
// @gate enableAsyncActions
- test(
+ it(
'updates in an async action are entangled even if useTransition hook ' +
'is unmounted before it finishes (class component)',
async () => {
@@ -1562,7 +1562,7 @@ describe('ReactAsyncActions', () => {
);
// @gate enableAsyncActions
- test(
+ it(
'updates in an async action are entangled even if useTransition hook ' +
'is unmounted before it finishes (root update)',
async () => {
@@ -1647,7 +1647,7 @@ describe('ReactAsyncActions', () => {
);
// @gate enableAsyncActions
- test('React.startTransition supports async actions', async () => {
+ it('React.startTransition supports async actions', async () => {
const startTransition = React.startTransition;
function App({text}) {
@@ -1685,7 +1685,7 @@ describe('ReactAsyncActions', () => {
});
// @gate enableAsyncActions
- test('useOptimistic works with async actions passed to React.startTransition', async () => {
+ it('useOptimistic works with async actions passed to React.startTransition', async () => {
const startTransition = React.startTransition;
let setOptimisticText;
@@ -1732,7 +1732,7 @@ describe('ReactAsyncActions', () => {
});
// @gate enableAsyncActions
- test(
+ it(
'regression: updates in an action passed to React.startTransition are batched ' +
'even if there were no updates before the first await',
async () => {
@@ -1801,7 +1801,7 @@ describe('ReactAsyncActions', () => {
},
);
- test('React.startTransition captures async errors and passes them to reportError', async () => {
+ it('React.startTransition captures async errors and passes them to reportError', async () => {
// NOTE: This is gated here instead of using the pragma because the failure
// happens asynchronously and the `gate` runtime doesn't capture it.
if (gate(flags => flags.enableAsyncActions)) {
@@ -1815,7 +1815,7 @@ describe('ReactAsyncActions', () => {
});
// @gate enableAsyncActions
- test('React.startTransition captures sync errors and passes them to reportError', async () => {
+ it('React.startTransition captures sync errors and passes them to reportError', async () => {
await act(() => {
try {
React.startTransition(() => {
diff --git a/packages/react-reconciler/src/__tests__/ReactClassComponentPropResolution-test.js b/packages/react-reconciler/src/__tests__/ReactClassComponentPropResolution-test.js
index 53f3a3d04b564..36889aed296ad 100644
--- a/packages/react-reconciler/src/__tests__/ReactClassComponentPropResolution-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactClassComponentPropResolution-test.js
@@ -31,7 +31,7 @@ describe('ReactClassComponentPropResolution', () => {
return text;
}
- test('resolves ref and default props before calling lifecycle methods', async () => {
+ it('resolves ref and default props before calling lifecycle methods', async () => {
const root = ReactNoop.createRoot();
function getPropKeys(props) {
diff --git a/packages/react-reconciler/src/__tests__/ReactClassSetStateCallback-test.js b/packages/react-reconciler/src/__tests__/ReactClassSetStateCallback-test.js
index e9b25f2ca74dc..c9e0a36d0cb49 100644
--- a/packages/react-reconciler/src/__tests__/ReactClassSetStateCallback-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactClassSetStateCallback-test.js
@@ -22,7 +22,7 @@ describe('ReactClassSetStateCallback', () => {
return text;
}
- test('regression: setState callback (2nd arg) should only fire once, even after a rebase', async () => {
+ it('regression: setState callback (2nd arg) should only fire once, even after a rebase', async () => {
let app;
class App extends React.Component {
state = {step: 0};
diff --git a/packages/react-reconciler/src/__tests__/ReactConcurrentErrorRecovery-test.js b/packages/react-reconciler/src/__tests__/ReactConcurrentErrorRecovery-test.js
index d665530082c1f..1af61323fc941 100644
--- a/packages/react-reconciler/src/__tests__/ReactConcurrentErrorRecovery-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactConcurrentErrorRecovery-test.js
@@ -162,7 +162,7 @@ describe('ReactConcurrentErrorRecovery', () => {
const rejectText = rejectMostRecentTextCache;
// @gate enableLegacyCache
- test('errors during a refresh transition should not force fallbacks to display (suspend then error)', async () => {
+ it('errors during a refresh transition should not force fallbacks to display (suspend then error)', async () => {
class ErrorBoundary extends React.Component {
state = {error: null};
static getDerivedStateFromError(error) {
@@ -234,7 +234,7 @@ describe('ReactConcurrentErrorRecovery', () => {
});
// @gate enableLegacyCache
- test('errors during a refresh transition should not force fallbacks to display (error then suspend)', async () => {
+ it('errors during a refresh transition should not force fallbacks to display (error then suspend)', async () => {
class ErrorBoundary extends React.Component {
state = {error: null};
static getDerivedStateFromError(error) {
@@ -306,7 +306,7 @@ describe('ReactConcurrentErrorRecovery', () => {
});
// @gate enableLegacyCache
- test('suspending in the shell (outside a Suspense boundary) should not throw, warn, or log during a transition', async () => {
+ it('suspending in the shell (outside a Suspense boundary) should not throw, warn, or log during a transition', async () => {
class ErrorBoundary extends React.Component {
state = {error: null};
static getDerivedStateFromError(error) {
@@ -356,7 +356,7 @@ describe('ReactConcurrentErrorRecovery', () => {
});
// @gate enableLegacyCache
- test(
+ it(
'errors during a suspended transition at the shell should not force ' +
'fallbacks to display (error then suspend)',
async () => {
diff --git a/packages/react-reconciler/src/__tests__/ReactContextPropagation-test.js b/packages/react-reconciler/src/__tests__/ReactContextPropagation-test.js
index a58bbeaf4558a..f6ebd3c57494e 100644
--- a/packages/react-reconciler/src/__tests__/ReactContextPropagation-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactContextPropagation-test.js
@@ -169,7 +169,7 @@ describe('ReactLazyContextPropagation', () => {
// }
// }
- test(
+ it(
'context change should prevent bailout of memoized component (useMemo -> ' +
'no intermediate fiber)',
async () => {
@@ -217,7 +217,7 @@ describe('ReactLazyContextPropagation', () => {
},
);
- test('context change should prevent bailout of memoized component (memo HOC)', async () => {
+ it('context change should prevent bailout of memoized component (memo HOC)', async () => {
const root = ReactNoop.createRoot();
const Context = React.createContext(0);
@@ -258,7 +258,7 @@ describe('ReactLazyContextPropagation', () => {
expect(root).toMatchRenderedOutput('1');
});
- test('context change should prevent bailout of memoized component (PureComponent)', async () => {
+ it('context change should prevent bailout of memoized component (PureComponent)', async () => {
const root = ReactNoop.createRoot();
const Context = React.createContext(0);
@@ -301,7 +301,7 @@ describe('ReactLazyContextPropagation', () => {
expect(root).toMatchRenderedOutput('1');
});
- test("context consumer bails out if context hasn't changed", async () => {
+ it("context consumer bails out if context hasn't changed", async () => {
const root = ReactNoop.createRoot();
const Context = React.createContext(0);
@@ -349,7 +349,7 @@ describe('ReactLazyContextPropagation', () => {
});
// @gate enableLegacyCache
- test('context is propagated across retries', async () => {
+ it('context is propagated across retries', async () => {
const root = ReactNoop.createRoot();
const Context = React.createContext('A');
@@ -410,7 +410,7 @@ describe('ReactLazyContextPropagation', () => {
});
// @gate enableLegacyCache
- test('multiple contexts are propagated across retries', async () => {
+ it('multiple contexts are propagated across retries', async () => {
// Same as previous test, but with multiple context providers
const root = ReactNoop.createRoot();
@@ -490,7 +490,7 @@ describe('ReactLazyContextPropagation', () => {
});
// @gate enableLegacyCache && !disableLegacyMode
- test('context is propagated across retries (legacy)', async () => {
+ it('context is propagated across retries (legacy)', async () => {
const root = ReactNoop.createLegacyRoot();
const Context = React.createContext('A');
@@ -551,7 +551,7 @@ describe('ReactLazyContextPropagation', () => {
});
// @gate enableLegacyCache && enableLegacyHidden
- test('context is propagated through offscreen trees', async () => {
+ it('context is propagated through offscreen trees', async () => {
const LegacyHidden = React.unstable_LegacyHidden;
const root = ReactNoop.createRoot();
@@ -597,7 +597,7 @@ describe('ReactLazyContextPropagation', () => {
});
// @gate enableLegacyCache && enableLegacyHidden
- test('multiple contexts are propagated across through offscreen trees', async () => {
+ it('multiple contexts are propagated across through offscreen trees', async () => {
// Same as previous test, but with multiple context providers
const LegacyHidden = React.unstable_LegacyHidden;
@@ -658,7 +658,7 @@ describe('ReactLazyContextPropagation', () => {
});
// @gate enableSuspenseList
- test('contexts are propagated through SuspenseList', async () => {
+ it('contexts are propagated through SuspenseList', async () => {
// This kinda tests an implementation detail. SuspenseList has an early
// bailout that doesn't use `bailoutOnAlreadyFinishedWork`. It probably
// should just use that function, though.
@@ -699,7 +699,7 @@ describe('ReactLazyContextPropagation', () => {
expect(root).toMatchRenderedOutput('BB');
});
- test('nested bailouts', async () => {
+ it('nested bailouts', async () => {
// Lazy context propagation will stop propagating when it hits the first
// match. If we bail out again inside that tree, we must resume propagating.
@@ -754,7 +754,7 @@ describe('ReactLazyContextPropagation', () => {
});
// @gate enableLegacyCache
- test('nested bailouts across retries', async () => {
+ it('nested bailouts across retries', async () => {
// Lazy context propagation will stop propagating when it hits the first
// match. If we bail out again inside that tree, we must resume propagating.
@@ -823,7 +823,7 @@ describe('ReactLazyContextPropagation', () => {
});
// @gate enableLegacyCache && enableLegacyHidden
- test('nested bailouts through offscreen trees', async () => {
+ it('nested bailouts through offscreen trees', async () => {
// Lazy context propagation will stop propagating when it hits the first
// match. If we bail out again inside that tree, we must resume propagating.
@@ -877,7 +877,7 @@ describe('ReactLazyContextPropagation', () => {
expect(root).toMatchRenderedOutput('BB');
});
- test('finds context consumers in multiple sibling branches', async () => {
+ it('finds context consumers in multiple sibling branches', async () => {
// This test confirms that when we find a matching context consumer during
// propagation, we continue propagating to its sibling branches.
diff --git a/packages/react-reconciler/src/__tests__/ReactEffectOrdering-test.js b/packages/react-reconciler/src/__tests__/ReactEffectOrdering-test.js
index 259492f294cfc..31ce1d6ac2bca 100644
--- a/packages/react-reconciler/src/__tests__/ReactEffectOrdering-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactEffectOrdering-test.js
@@ -36,7 +36,7 @@ describe('ReactEffectOrdering', () => {
assertLog = InternalTestUtils.assertLog;
});
- test('layout unmounts on deletion are fired in parent -> child order', async () => {
+ it('layout unmounts on deletion are fired in parent -> child order', async () => {
const root = ReactNoop.createRoot();
function Parent() {
@@ -63,7 +63,7 @@ describe('ReactEffectOrdering', () => {
assertLog(['Unmount parent', 'Unmount child']);
});
- test('passive unmounts on deletion are fired in parent -> child order', async () => {
+ it('passive unmounts on deletion are fired in parent -> child order', async () => {
const root = ReactNoop.createRoot();
function Parent() {
diff --git a/packages/react-reconciler/src/__tests__/ReactFiberRefs-test.js b/packages/react-reconciler/src/__tests__/ReactFiberRefs-test.js
index 8b46dc600ab05..2a0590af3171d 100644
--- a/packages/react-reconciler/src/__tests__/ReactFiberRefs-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactFiberRefs-test.js
@@ -25,7 +25,7 @@ describe('ReactFiberRefs', () => {
assertLog = require('internal-test-utils').assertLog;
});
- test('ref is attached even if there are no other updates (class)', async () => {
+ it('ref is attached even if there are no other updates (class)', async () => {
let component;
class Component extends React.Component {
shouldComponentUpdate() {
@@ -61,7 +61,7 @@ describe('ReactFiberRefs', () => {
expect(ref2.current).toBe(component);
});
- test('ref is attached even if there are no other updates (host component)', async () => {
+ it('ref is attached even if there are no other updates (host component)', async () => {
// This is kind of ailly test because host components never bail out if they
// receive a new element, and there's no way to update a ref without also
// updating the props, but adding it here anyway for symmetry with the
@@ -87,7 +87,7 @@ describe('ReactFiberRefs', () => {
// @gate enableRefAsProp
// @gate !disableStringRefs
- test('string ref props are converted to function refs', async () => {
+ it('string ref props are converted to function refs', async () => {
let refProp;
function Child({ref}) {
refProp = ref;
@@ -115,7 +115,7 @@ describe('ReactFiberRefs', () => {
});
// @gate disableStringRefs
- test('throw if a string ref is passed to a ref-receiving component', async () => {
+ it('throw if a string ref is passed to a ref-receiving component', async () => {
let refProp;
function Child({ref}) {
// This component renders successfully because the ref type check does not
@@ -139,7 +139,7 @@ describe('ReactFiberRefs', () => {
expect(refProp).toBe('child');
});
- test('strings refs can be codemodded to callback refs', async () => {
+ it('strings refs can be codemodded to callback refs', async () => {
let app;
class App extends React.Component {
render() {
@@ -163,7 +163,7 @@ describe('ReactFiberRefs', () => {
expect(app.refs.div.prop).toBe('Hello!');
});
- test('class refs are initialized to a frozen shared object', async () => {
+ it('class refs are initialized to a frozen shared object', async () => {
const refsCollection = new Set();
class Component extends React.Component {
constructor(props) {
diff --git a/packages/react-reconciler/src/__tests__/ReactFlushSyncNoAggregateError-test.js b/packages/react-reconciler/src/__tests__/ReactFlushSyncNoAggregateError-test.js
index d971521efe6d8..adfeb3319bdce 100644
--- a/packages/react-reconciler/src/__tests__/ReactFlushSyncNoAggregateError-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactFlushSyncNoAggregateError-test.js
@@ -93,7 +93,7 @@ describe('ReactFlushSync (AggregateError not available)', () => {
: children;
}
- test('completely exhausts synchronous work queue even if something throws', async () => {
+ it('completely exhausts synchronous work queue even if something throws', async () => {
function Throws({error}) {
throw error;
}
diff --git a/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js b/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js
index fd1879dabfbae..ab7e4e5802fd2 100644
--- a/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js
+++ b/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js
@@ -1244,25 +1244,6 @@ describe('ReactHooks', () => {
]);
});
- it('warns when reading context inside useMemo', async () => {
- const {useMemo, createContext} = React;
- const ReactSharedInternals =
- React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
-
- const ThemeContext = createContext('light');
- function App() {
- return useMemo(() => {
- return ReactSharedInternals.H.readContext(ThemeContext);
- }, []);
- }
-
- await expect(async () => {
- await act(() => {
- ReactTestRenderer.create(
, {unstable_isConcurrent: true});
- });
- }).toErrorDev('Context can only be read while React is rendering');
- });
-
it('double-invokes components with Hooks in Strict Mode', async () => {
ReactFeatureFlags.debugRenderPhaseSideEffectsForStrictMode = true;
diff --git a/packages/react-reconciler/src/__tests__/ReactIncremental-test.js b/packages/react-reconciler/src/__tests__/ReactIncremental-test.js
index f0fe5d5afb426..2ce110bebe55a 100644
--- a/packages/react-reconciler/src/__tests__/ReactIncremental-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactIncremental-test.js
@@ -325,7 +325,8 @@ describe('ReactIncremental', () => {
await waitForAll(['Middle', 'Middle']);
});
- xit('can resume work in a subtree even when a parent bails out', async () => {
+ // eslint-disable-next-line jest/no-disabled-tests
+ it.skip('can resume work in a subtree even when a parent bails out', async () => {
function Bar(props) {
Scheduler.log('Bar');
return
{props.children}
;
@@ -381,7 +382,8 @@ describe('ReactIncremental', () => {
await waitForAll(['Middle']);
});
- xit('can resume work in a bailed subtree within one pass', async () => {
+ // eslint-disable-next-line jest/no-disabled-tests
+ it.skip('can resume work in a bailed subtree within one pass', async () => {
function Bar(props) {
Scheduler.log('Bar');
return
{props.children}
;
@@ -467,7 +469,8 @@ describe('ReactIncremental', () => {
await waitForAll(['Foo', 'Bar', 'Bar']);
});
- xit('can resume mounting a class component', async () => {
+ // eslint-disable-next-line jest/no-disabled-tests
+ it.skip('can resume mounting a class component', async () => {
let foo;
class Parent extends React.Component {
shouldComponentUpdate() {
@@ -505,7 +508,8 @@ describe('ReactIncremental', () => {
await waitForAll(['Foo', 'Bar']);
});
- xit('reuses the same instance when resuming a class instance', async () => {
+ // eslint-disable-next-line jest/no-disabled-tests
+ it.skip('reuses the same instance when resuming a class instance', async () => {
let foo;
class Parent extends React.Component {
shouldComponentUpdate() {
@@ -572,7 +576,8 @@ describe('ReactIncremental', () => {
]);
});
- xit('can reuse work done after being preempted', async () => {
+ // eslint-disable-next-line jest/no-disabled-tests
+ it.skip('can reuse work done after being preempted', async () => {
function Bar(props) {
Scheduler.log('Bar');
return
{props.children}
;
@@ -650,7 +655,8 @@ describe('ReactIncremental', () => {
await waitForAll(['Middle']);
});
- xit('can reuse work that began but did not complete, after being preempted', async () => {
+ // eslint-disable-next-line jest/no-disabled-tests
+ it.skip('can reuse work that began but did not complete, after being preempted', async () => {
let child;
let sibling;
@@ -724,7 +730,8 @@ describe('ReactIncremental', () => {
]);
});
- xit('can reuse work if shouldComponentUpdate is false, after being preempted', async () => {
+ // eslint-disable-next-line jest/no-disabled-tests
+ it.skip('can reuse work if shouldComponentUpdate is false, after being preempted', async () => {
function Bar(props) {
Scheduler.log('Bar');
return
{props.children}
;
@@ -1048,7 +1055,8 @@ describe('ReactIncremental', () => {
await waitForAll([]);
});
- xit('can call sCU while resuming a partly mounted component', () => {
+ // eslint-disable-next-line jest/no-disabled-tests
+ it.skip('can call sCU while resuming a partly mounted component', () => {
const instances = new Set();
class Bar extends React.Component {
@@ -1093,7 +1101,8 @@ describe('ReactIncremental', () => {
expect(instances.size).toBe(4);
});
- xit('gets new props when setting state on a partly updated component', async () => {
+ // eslint-disable-next-line jest/no-disabled-tests
+ it.skip('gets new props when setting state on a partly updated component', async () => {
const instances = [];
class Bar extends React.Component {
@@ -1155,7 +1164,8 @@ describe('ReactIncremental', () => {
await waitForAll(['Bar:A-1', 'Baz']);
});
- xit('calls componentWillMount twice if the initial render is aborted', async () => {
+ // eslint-disable-next-line jest/no-disabled-tests
+ it.skip('calls componentWillMount twice if the initial render is aborted', async () => {
class LifeCycle extends React.Component {
state = {x: this.props.x};
UNSAFE_componentWillReceiveProps(nextProps) {
@@ -1207,7 +1217,8 @@ describe('ReactIncremental', () => {
]);
});
- xit('uses state set in componentWillMount even if initial render was aborted', async () => {
+ // eslint-disable-next-line jest/no-disabled-tests
+ it.skip('uses state set in componentWillMount even if initial render was aborted', async () => {
class LifeCycle extends React.Component {
constructor(props) {
super(props);
@@ -1245,7 +1256,8 @@ describe('ReactIncremental', () => {
]);
});
- xit('calls componentWill* twice if an update render is aborted', async () => {
+ // eslint-disable-next-line jest/no-disabled-tests
+ it.skip('calls componentWill* twice if an update render is aborted', async () => {
class LifeCycle extends React.Component {
UNSAFE_componentWillMount() {
Scheduler.log('componentWillMount:' + this.props.x);
@@ -1390,7 +1402,8 @@ describe('ReactIncremental', () => {
await waitForAll(['Child']);
});
- xit('does not call componentWillReceiveProps for state-only updates', async () => {
+ // eslint-disable-next-line jest/no-disabled-tests
+ it.skip('does not call componentWillReceiveProps for state-only updates', async () => {
const instances = [];
class LifeCycle extends React.Component {
@@ -1527,7 +1540,8 @@ describe('ReactIncremental', () => {
// incomplete parents.
});
- xit('skips will/DidUpdate when bailing unless an update was already in progress', async () => {
+ // eslint-disable-next-line jest/no-disabled-tests
+ it.skip('skips will/DidUpdate when bailing unless an update was already in progress', async () => {
class LifeCycle extends React.Component {
UNSAFE_componentWillMount() {
Scheduler.log('componentWillMount');
@@ -2240,7 +2254,8 @@ describe('ReactIncremental', () => {
]);
});
- xit('should reuse memoized work if pointers are updated before calling lifecycles', async () => {
+ // eslint-disable-next-line jest/no-disabled-tests
+ it.skip('should reuse memoized work if pointers are updated before calling lifecycles', async () => {
const cduNextProps = [];
const cduPrevProps = [];
const scuNextProps = [];
diff --git a/packages/react-reconciler/src/__tests__/ReactIncrementalSideEffects-test.js b/packages/react-reconciler/src/__tests__/ReactIncrementalSideEffects-test.js
index 8b1de82b26dc7..8a633c1ceed77 100644
--- a/packages/react-reconciler/src/__tests__/ReactIncrementalSideEffects-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactIncrementalSideEffects-test.js
@@ -752,7 +752,8 @@ describe('ReactIncrementalSideEffects', () => {
);
});
- xit('can defer side-effects and resume them later on', async () => {
+ // eslint-disable-next-line jest/no-disabled-tests
+ it.skip('can defer side-effects and resume them later on', async () => {
class Bar extends React.Component {
shouldComponentUpdate(nextProps) {
return this.props.idx !== nextProps.idx;
@@ -835,7 +836,8 @@ describe('ReactIncrementalSideEffects', () => {
expect(innerSpanA).toBe(innerSpanB);
});
- xit('can defer side-effects and reuse them later - complex', async function () {
+ // eslint-disable-next-line jest/no-disabled-tests
+ it.skip('can defer side-effects and reuse them later - complex', async function () {
let ops = [];
class Bar extends React.Component {
diff --git a/packages/react-reconciler/src/__tests__/ReactInterleavedUpdates-test.js b/packages/react-reconciler/src/__tests__/ReactInterleavedUpdates-test.js
index 7e676861b5d31..e8b40f63ab7ab 100644
--- a/packages/react-reconciler/src/__tests__/ReactInterleavedUpdates-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactInterleavedUpdates-test.js
@@ -32,7 +32,7 @@ describe('ReactInterleavedUpdates', () => {
return text;
}
- test('update during an interleaved event is not processed during the current render', async () => {
+ it('update during an interleaved event is not processed during the current render', async () => {
const updaters = [];
function Child() {
@@ -87,7 +87,7 @@ describe('ReactInterleavedUpdates', () => {
});
// @gate forceConcurrentByDefaultForTesting
- test('low priority update during an interleaved event is not processed during the current render', async () => {
+ it('low priority update during an interleaved event is not processed during the current render', async () => {
// Same as previous test, but the interleaved update is lower priority than
// the in-progress render.
const updaters = [];
@@ -141,7 +141,7 @@ describe('ReactInterleavedUpdates', () => {
expect(root).toMatchRenderedOutput('222');
});
- test('regression for #24350: does not add to main update queue until interleaved update queue has been cleared', async () => {
+ it('regression for #24350: does not add to main update queue until interleaved update queue has been cleared', async () => {
let setStep;
function App() {
const [step, _setState] = useState(0);
diff --git a/packages/react-reconciler/src/__tests__/ReactIsomorphicAct-test.js b/packages/react-reconciler/src/__tests__/ReactIsomorphicAct-test.js
index 7fbb3efc3bb62..b7d034d1ae968 100644
--- a/packages/react-reconciler/src/__tests__/ReactIsomorphicAct-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactIsomorphicAct-test.js
@@ -51,7 +51,7 @@ describe('isomorphic act()', () => {
}
// @gate __DEV__
- test('bypasses queueMicrotask', async () => {
+ it('bypasses queueMicrotask', async () => {
const root = ReactNoop.createRoot();
// First test what happens without wrapping in act. This update would
@@ -78,12 +78,12 @@ describe('isomorphic act()', () => {
});
// @gate __DEV__
- test('return value – sync callback', async () => {
+ it('return value – sync callback', async () => {
expect(await act(() => 'hi')).toEqual('hi');
});
// @gate __DEV__
- test('return value – sync callback, nested', async () => {
+ it('return value – sync callback, nested', async () => {
const returnValue = await act(() => {
return act(() => 'hi');
});
@@ -91,7 +91,7 @@ describe('isomorphic act()', () => {
});
// @gate __DEV__
- test('return value – async callback', async () => {
+ it('return value – async callback', async () => {
const returnValue = await act(async () => {
return await Promise.resolve('hi');
});
@@ -99,7 +99,7 @@ describe('isomorphic act()', () => {
});
// @gate __DEV__
- test('return value – async callback, nested', async () => {
+ it('return value – async callback, nested', async () => {
const returnValue = await act(async () => {
return await act(async () => {
return await Promise.resolve('hi');
@@ -109,7 +109,7 @@ describe('isomorphic act()', () => {
});
// @gate __DEV__ && !disableLegacyMode
- test('in legacy mode, updates are batched', () => {
+ it('in legacy mode, updates are batched', () => {
const root = ReactNoop.createLegacyRoot();
// Outside of `act`, legacy updates are flushed completely synchronously
@@ -137,7 +137,7 @@ describe('isomorphic act()', () => {
});
// @gate __DEV__ && !disableLegacyMode
- test('in legacy mode, in an async scope, updates are batched until the first `await`', async () => {
+ it('in legacy mode, in an async scope, updates are batched until the first `await`', async () => {
const root = ReactNoop.createLegacyRoot();
await act(async () => {
@@ -168,7 +168,7 @@ describe('isomorphic act()', () => {
});
// @gate __DEV__ && !disableLegacyMode
- test('in legacy mode, in an async scope, updates are batched until the first `await` (regression test: batchedUpdates)', async () => {
+ it('in legacy mode, in an async scope, updates are batched until the first `await` (regression test: batchedUpdates)', async () => {
const root = ReactNoop.createLegacyRoot();
await act(async () => {
@@ -206,7 +206,7 @@ describe('isomorphic act()', () => {
});
// @gate __DEV__
- test('unwraps promises by yielding to microtasks (async act scope)', async () => {
+ it('unwraps promises by yielding to microtasks (async act scope)', async () => {
const promise = Promise.resolve('Async');
function Fallback() {
@@ -231,7 +231,7 @@ describe('isomorphic act()', () => {
});
// @gate __DEV__
- test('unwraps promises by yielding to microtasks (non-async act scope)', async () => {
+ it('unwraps promises by yielding to microtasks (non-async act scope)', async () => {
const promise = Promise.resolve('Async');
function Fallback() {
@@ -258,7 +258,7 @@ describe('isomorphic act()', () => {
});
// @gate __DEV__
- test('warns if a promise is used in a non-awaited `act` scope', async () => {
+ it('warns if a promise is used in a non-awaited `act` scope', async () => {
const promise = new Promise(() => {});
function Fallback() {
@@ -298,7 +298,7 @@ describe('isomorphic act()', () => {
});
// @gate __DEV__
- test('does not warn when suspending via legacy `throw` API in non-awaited `act` scope', async () => {
+ it('does not warn when suspending via legacy `throw` API in non-awaited `act` scope', async () => {
let didResolve = false;
let resolvePromise;
const promise = new Promise(r => {
diff --git a/packages/react-reconciler/src/__tests__/ReactSuspenseList-test.js b/packages/react-reconciler/src/__tests__/ReactSuspenseList-test.js
index e69d7e4123425..b8a64d99fbf56 100644
--- a/packages/react-reconciler/src/__tests__/ReactSuspenseList-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactSuspenseList-test.js
@@ -2373,94 +2373,6 @@ describe('ReactSuspenseList', () => {
expect(previousInst).toBe(setAsyncB);
});
- // @gate enableSuspenseList
- it('is able to re-suspend the last rows during an update with hidden', async () => {
- const AsyncB = createAsyncText('B');
-
- let setAsyncB;
-
- function B() {
- const [shouldBeAsync, setAsync] = React.useState(false);
- setAsyncB = setAsync;
-
- return shouldBeAsync ? (
-
}>
-
-
- ) : (
-
- );
- }
-
- function Foo({updateList}) {
- return (
-
- }>
-
-
-
-
- );
- }
-
- ReactNoop.render(
);
-
- await waitForAll(['A', 'Sync B']);
-
- expect(ReactNoop).toMatchRenderedOutput(
- <>
-
A
-
Sync B
- >,
- );
-
- const previousInst = setAsyncB;
-
- // During an update we suspend on B.
- await act(() => setAsyncB(true));
-
- assertLog([
- 'Suspend! [B]',
- 'Loading B',
- // The second pass is the "force hide" pass
- 'Loading B',
- ]);
-
- expect(ReactNoop).toMatchRenderedOutput(
- <>
-
A
-
Loading B
- >,
- );
-
- // Before we resolve we'll rerender the whole list.
- // This should leave the tree intact.
- await act(() => ReactNoop.render(
));
-
- assertLog(['A', 'Suspend! [B]', 'Loading B']);
-
- expect(ReactNoop).toMatchRenderedOutput(
- <>
-
A
-
Loading B
- >,
- );
-
- await act(() => AsyncB.resolve());
- assertLog(['B']);
-
- expect(ReactNoop).toMatchRenderedOutput(
- <>
-
A
-
B
- >,
- );
-
- // This should be the same instance. I.e. it didn't
- // remount.
- expect(previousInst).toBe(setAsyncB);
- });
-
// @gate enableSuspenseList
it('is able to interrupt a partially rendered tree and continue later', async () => {
const AsyncA = createAsyncText('A');
diff --git a/packages/react-reconciler/src/__tests__/ReactSuspenseyCommitPhase-test.js b/packages/react-reconciler/src/__tests__/ReactSuspenseyCommitPhase-test.js
index 8a52167a934ba..972416eddedb8 100644
--- a/packages/react-reconciler/src/__tests__/ReactSuspenseyCommitPhase-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactSuspenseyCommitPhase-test.js
@@ -50,7 +50,7 @@ describe('ReactSuspenseyCommitPhase', () => {
);
}
- test('suspend commit during initial mount', async () => {
+ it('suspend commit during initial mount', async () => {
const root = ReactNoop.createRoot();
await act(async () => {
startTransition(() => {
@@ -70,7 +70,7 @@ describe('ReactSuspenseyCommitPhase', () => {
expect(root).toMatchRenderedOutput(
);
});
- test('suspend commit during update', async () => {
+ it('suspend commit during update', async () => {
const root = ReactNoop.createRoot();
await act(() => resolveSuspenseyThing('A'));
await act(async () => {
@@ -105,7 +105,7 @@ describe('ReactSuspenseyCommitPhase', () => {
expect(root).toMatchRenderedOutput(
);
});
- test('suspend commit during initial mount at the root', async () => {
+ it('suspend commit during initial mount at the root', async () => {
const root = ReactNoop.createRoot();
await act(async () => {
startTransition(() => {
@@ -121,7 +121,7 @@ describe('ReactSuspenseyCommitPhase', () => {
expect(root).toMatchRenderedOutput(
);
});
- test('suspend commit during update at the root', async () => {
+ it('suspend commit during update at the root', async () => {
const root = ReactNoop.createRoot();
await act(() => resolveSuspenseyThing('A'));
expect(getSuspenseyThingStatus('A')).toBe('fulfilled');
@@ -147,7 +147,7 @@ describe('ReactSuspenseyCommitPhase', () => {
expect(root).toMatchRenderedOutput(
);
});
- test('suspend commit during urgent initial mount', async () => {
+ it('suspend commit during urgent initial mount', async () => {
const root = ReactNoop.createRoot();
await act(async () => {
root.render(
@@ -165,7 +165,7 @@ describe('ReactSuspenseyCommitPhase', () => {
expect(root).toMatchRenderedOutput(
);
});
- test('suspend commit during urgent update', async () => {
+ it('suspend commit during urgent update', async () => {
const root = ReactNoop.createRoot();
await act(() => resolveSuspenseyThing('A'));
expect(getSuspenseyThingStatus('A')).toBe('fulfilled');
@@ -203,7 +203,7 @@ describe('ReactSuspenseyCommitPhase', () => {
expect(root).toMatchRenderedOutput(
);
});
- test('suspends commit during urgent initial mount at the root', async () => {
+ it('suspends commit during urgent initial mount at the root', async () => {
const root = ReactNoop.createRoot();
await act(async () => {
root.render(
);
@@ -217,7 +217,7 @@ describe('ReactSuspenseyCommitPhase', () => {
expect(root).toMatchRenderedOutput(
);
});
- test('suspends commit during urgent update at the root', async () => {
+ it('suspends commit during urgent update at the root', async () => {
const root = ReactNoop.createRoot();
await act(() => resolveSuspenseyThing('A'));
expect(getSuspenseyThingStatus('A')).toBe('fulfilled');
@@ -243,7 +243,7 @@ describe('ReactSuspenseyCommitPhase', () => {
// even if it is forced to be sync because we don't want to FOUC but refactoring the sync
// pathway is too risky to land right now so we just accept that we can still FOUC in this
// very specific case.
- test('does not suspend commit during urgent initial mount at the root when sync rendering', async () => {
+ it('does not suspend commit during urgent initial mount at the root when sync rendering', async () => {
const root = ReactNoop.createRoot();
await act(async () => {
ReactNoop.flushSync(() => {
@@ -264,7 +264,7 @@ describe('ReactSuspenseyCommitPhase', () => {
// even if it is forced to be sync because we don't want to FOUC but refactoring the sync
// pathway is too risky to land right now so we just accept that we can still FOUC in this
// very specific case.
- test('does not suspend commit during urgent update at the root when sync rendering', async () => {
+ it('does not suspend commit during urgent update at the root when sync rendering', async () => {
const root = ReactNoop.createRoot();
await act(() => resolveSuspenseyThing('A'));
expect(getSuspenseyThingStatus('A')).toBe('fulfilled');
@@ -291,7 +291,7 @@ describe('ReactSuspenseyCommitPhase', () => {
expect(root).toMatchRenderedOutput(
);
});
- test('an urgent update interrupts a suspended commit', async () => {
+ it('an urgent update interrupts a suspended commit', async () => {
const root = ReactNoop.createRoot();
// Mount an image. This transition will suspend because it's not inside a
@@ -313,7 +313,7 @@ describe('ReactSuspenseyCommitPhase', () => {
expect(root).toMatchRenderedOutput('Something else');
});
- test('a transition update interrupts a suspended commit', async () => {
+ it('a transition update interrupts a suspended commit', async () => {
const root = ReactNoop.createRoot();
// Mount an image. This transition will suspend because it's not inside a
@@ -338,7 +338,7 @@ describe('ReactSuspenseyCommitPhase', () => {
});
// @gate enableSuspenseList
- test('demonstrate current behavior when used with SuspenseList (not ideal)', async () => {
+ it('demonstrate current behavior when used with SuspenseList (not ideal)', async () => {
function App() {
return (
@@ -389,7 +389,7 @@ describe('ReactSuspenseyCommitPhase', () => {
);
});
- test('avoid triggering a fallback if resource loads immediately', async () => {
+ it('avoid triggering a fallback if resource loads immediately', async () => {
const root = ReactNoop.createRoot();
await act(async () => {
startTransition(() => {
@@ -438,7 +438,7 @@ describe('ReactSuspenseyCommitPhase', () => {
});
// @gate enableActivity
- test("host instances don't suspend during prerendering, but do suspend when they are revealed", async () => {
+ it("host instances don't suspend during prerendering, but do suspend when they are revealed", async () => {
function More() {
Scheduler.log('More');
return ;
diff --git a/packages/react-reconciler/src/__tests__/ReactTransition-test.js b/packages/react-reconciler/src/__tests__/ReactTransition-test.js
index 5be3278b52574..c466fb615c54c 100644
--- a/packages/react-reconciler/src/__tests__/ReactTransition-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactTransition-test.js
@@ -169,7 +169,7 @@ describe('ReactTransition', () => {
}
// @gate enableLegacyCache
- test('isPending works even if called from outside an input event', async () => {
+ it('isPending works even if called from outside an input event', async () => {
let start;
function App() {
const [show, setShow] = useState(false);
@@ -210,7 +210,7 @@ describe('ReactTransition', () => {
});
// @gate enableLegacyCache
- test(
+ it(
'when multiple transitions update the same queue, only the most recent ' +
'one is allowed to finish (no intermediate states)',
async () => {
@@ -329,7 +329,7 @@ describe('ReactTransition', () => {
// Same as previous test, but for class update queue.
// @gate enableLegacyCache
- test(
+ it(
'when multiple transitions update the same queue, only the most recent ' +
'one is allowed to finish (no intermediate states) (classes)',
async () => {
@@ -453,7 +453,7 @@ describe('ReactTransition', () => {
);
// @gate enableLegacyCache
- test(
+ it(
'when multiple transitions update overlapping queues, all the transitions ' +
'across all the queues are entangled',
async () => {
@@ -558,7 +558,7 @@ describe('ReactTransition', () => {
);
// @gate enableLegacyCache
- test('interrupt a refresh transition if a new transition is scheduled', async () => {
+ it('interrupt a refresh transition if a new transition is scheduled', async () => {
const root = ReactNoop.createRoot();
await act(() => {
@@ -613,7 +613,7 @@ describe('ReactTransition', () => {
});
// @gate enableLegacyCache
- test(
+ it(
"interrupt a refresh transition when something suspends and we've " +
'already bailed out on another transition in a parent',
async () => {
@@ -705,7 +705,7 @@ describe('ReactTransition', () => {
);
// @gate enableLegacyCache
- test(
+ it(
'interrupt a refresh transition when something suspends and a parent ' +
'component received an interleaved update after its queue was processed',
async () => {
diff --git a/packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js b/packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js
index 72397a8446a52..4245205946758 100644
--- a/packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js
@@ -180,7 +180,7 @@ describe('ReactInteractionTracing', () => {
}
// @gate enableTransitionTracing
- it(' should not call callbacks when transition is not defined', async () => {
+ it('should not call callbacks when transition is not defined', async () => {
const transitionCallbacks = {
onTransitionStart: (name, startTime) => {
Scheduler.log(`onTransitionStart(${name}, ${startTime})`);
@@ -1265,6 +1265,7 @@ describe('ReactInteractionTracing', () => {
});
// @gate enableTransitionTracing
+ // eslint-disable-next-line jest/no-disabled-tests
it.skip('warn and calls marker incomplete if name changes before transition completes', async () => {
const transitionCallbacks = {
onTransitionStart: (name, startTime) => {
@@ -1820,7 +1821,7 @@ describe('ReactInteractionTracing', () => {
});
// @gate enableTransitionTracing
- it('Suspense boundary not added by the transition is deleted ', async () => {
+ it('Suspense boundary not added by the transition is deleted', async () => {
const transitionCallbacks = {
onTransitionStart: (name, startTime) => {
Scheduler.log(`onTransitionStart(${name}, ${startTime})`);
diff --git a/packages/react-reconciler/src/__tests__/ReactUpdatePriority-test.js b/packages/react-reconciler/src/__tests__/ReactUpdatePriority-test.js
index c5de798366334..aa146558917c1 100644
--- a/packages/react-reconciler/src/__tests__/ReactUpdatePriority-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactUpdatePriority-test.js
@@ -35,7 +35,7 @@ describe('ReactUpdatePriority', () => {
return text;
}
- test('setState inside passive effect triggered by sync update should have default priority', async () => {
+ it('setState inside passive effect triggered by sync update should have default priority', async () => {
const root = ReactNoop.createRoot();
function App() {
@@ -56,7 +56,7 @@ describe('ReactUpdatePriority', () => {
assertLog([2]);
});
- test('setState inside passive effect triggered by idle update should have idle priority', async () => {
+ it('setState inside passive effect triggered by idle update should have idle priority', async () => {
const root = ReactNoop.createRoot();
let setDefaultState;
@@ -94,7 +94,7 @@ describe('ReactUpdatePriority', () => {
assertLog(['Idle: 2, Default: 2']);
});
- test('continuous updates should interrupt transitions', async () => {
+ it('continuous updates should interrupt transitions', async () => {
const root = ReactNoop.createRoot();
let setCounter;
diff --git a/packages/react-reconciler/src/__tests__/ReactUse-test.js b/packages/react-reconciler/src/__tests__/ReactUse-test.js
index 451912cd45478..dc45987828fdb 100644
--- a/packages/react-reconciler/src/__tests__/ReactUse-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactUse-test.js
@@ -89,7 +89,7 @@ describe('ReactUse', () => {
// add this back; however, the plan is to migrate all existing Suspense code
// to `use`, so the extra code probably isn't worth it.
// @gate TODO
- test('if suspended fiber is pinged in a microtask, retry immediately without unwinding the stack', async () => {
+ it('if suspended fiber is pinged in a microtask, retry immediately without unwinding the stack', async () => {
let fulfilled = false;
function Async() {
if (fulfilled) {
@@ -128,7 +128,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('Async');
});
- test('if suspended fiber is pinged in a microtask, it does not block a transition from completing', async () => {
+ it('if suspended fiber is pinged in a microtask, it does not block a transition from completing', async () => {
let fulfilled = false;
function Async() {
if (fulfilled) {
@@ -155,7 +155,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('Async');
});
- test('does not infinite loop if already fulfilled thenable is thrown', async () => {
+ it('does not infinite loop if already fulfilled thenable is thrown', async () => {
// An already fulfilled promise should never be thrown. Since it already
// fulfilled, we shouldn't bother trying to render again — doing so would
// likely lead to an infinite loop. This scenario should only happen if a
@@ -195,7 +195,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('Loading...');
});
- test('basic use(promise)', async () => {
+ it('basic use(promise)', async () => {
const promiseA = Promise.resolve('A');
const promiseB = Promise.resolve('B');
const promiseC = Promise.resolve('C');
@@ -223,7 +223,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('ABC');
});
- test("using a promise that's not cached between attempts", async () => {
+ it("using a promise that's not cached between attempts", async () => {
function Async() {
const text =
use(Promise.resolve('A')) +
@@ -256,7 +256,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('ABC');
});
- test('using a rejected promise will throw', async () => {
+ it('using a rejected promise will throw', async () => {
class ErrorBoundary extends React.Component {
state = {error: null};
static getDerivedStateFromError(error) {
@@ -300,7 +300,7 @@ describe('ReactUse', () => {
assertLog(['Oops!', 'Oops!']);
});
- test('use(promise) in multiple components', async () => {
+ it('use(promise) in multiple components', async () => {
// This tests that the state for tracking promises is reset per component.
const promiseA = Promise.resolve('A');
const promiseB = Promise.resolve('B');
@@ -333,7 +333,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('ABCD');
});
- test('use(promise) in multiple sibling components', async () => {
+ it('use(promise) in multiple sibling components', async () => {
// This tests that the state for tracking promises is reset per component.
const promiseA = {then: () => {}, status: 'pending', value: null};
@@ -368,7 +368,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('Loading...');
});
- test('erroring in the same component as an uncached promise does not result in an infinite loop', async () => {
+ it('erroring in the same component as an uncached promise does not result in an infinite loop', async () => {
class ErrorBoundary extends React.Component {
state = {error: null};
static getDerivedStateFromError(error) {
@@ -454,7 +454,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('Caught an error: Oops!');
});
- test('basic use(context)', async () => {
+ it('basic use(context)', async () => {
const ContextA = React.createContext('');
const ContextB = React.createContext('B');
@@ -477,7 +477,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('AB');
});
- test('interrupting while yielded should reset contexts', async () => {
+ it('interrupting while yielded should reset contexts', async () => {
let resolve;
const promise = new Promise(r => {
resolve = r;
@@ -523,7 +523,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput(Hello world!
);
});
- test('warns if use(promise) is wrapped with try/catch block', async () => {
+ it('warns if use(promise) is wrapped with try/catch block', async () => {
function Async() {
try {
return ;
@@ -558,7 +558,7 @@ describe('ReactUse', () => {
}
});
- test('during a transition, can unwrap async operations even if nothing is cached', async () => {
+ it('during a transition, can unwrap async operations even if nothing is cached', async () => {
function App() {
return ;
}
@@ -593,7 +593,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('Async');
});
- test("does not prevent a Suspense fallback from showing if it's a new boundary, even during a transition", async () => {
+ it("does not prevent a Suspense fallback from showing if it's a new boundary, even during a transition", async () => {
function App() {
return ;
}
@@ -635,7 +635,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('Async');
});
- test('when waiting for data to resolve, a fresh update will trigger a restart', async () => {
+ it('when waiting for data to resolve, a fresh update will trigger a restart', async () => {
function App() {
return ;
}
@@ -666,7 +666,7 @@ describe('ReactUse', () => {
assertLog(['Something different']);
});
- test('when waiting for data to resolve, an update on a different root does not cause work to be dropped', async () => {
+ it('when waiting for data to resolve, an update on a different root does not cause work to be dropped', async () => {
const promise = getAsyncText('Hi');
function App() {
@@ -708,7 +708,7 @@ describe('ReactUse', () => {
expect(root1).toMatchRenderedOutput('Hi');
});
- test('while suspended, hooks cannot be called (i.e. current dispatcher is unset correctly)', async () => {
+ it('while suspended, hooks cannot be called (i.e. current dispatcher is unset correctly)', async () => {
function App() {
return ;
}
@@ -736,7 +736,7 @@ describe('ReactUse', () => {
);
});
- test('unwraps thenable that fulfills synchronously without suspending', async () => {
+ it('unwraps thenable that fulfills synchronously without suspending', async () => {
function App() {
const thenable = {
then(resolve) {
@@ -763,7 +763,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('Hi');
});
- test('does not suspend indefinitely if an interleaved update was skipped', async () => {
+ it('does not suspend indefinitely if an interleaved update was skipped', async () => {
function Child({childShouldSuspend}) {
return (
{
expect(root).toMatchRenderedOutput('(empty)');
});
- test('when replaying a suspended component, reuses the hooks computed during the previous attempt (Memo)', async () => {
+ it('when replaying a suspended component, reuses the hooks computed during the previous attempt (Memo)', async () => {
function ExcitingText({text}) {
// This computes the uppercased version of some text. Pretend it's an
// expensive operation that we want to reuse.
@@ -894,7 +894,7 @@ describe('ReactUse', () => {
]);
});
- test('when replaying a suspended component, reuses the hooks computed during the previous attempt (State)', async () => {
+ it('when replaying a suspended component, reuses the hooks computed during the previous attempt (State)', async () => {
let _setFruit;
let _setVegetable;
function Kitchen() {
@@ -950,7 +950,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('banana dill');
});
- test('when replaying a suspended component, reuses the hooks computed during the previous attempt (DebugValue+State)', async () => {
+ it('when replaying a suspended component, reuses the hooks computed during the previous attempt (DebugValue+State)', async () => {
// Make sure we don't get a Hook mismatch warning on updates if there were non-stateful Hooks before the use().
let _setLawyer;
function Lexicon() {
@@ -991,7 +991,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('aguacate avocat');
});
- test(
+ it(
'wrap an async function with useMemo to skip running the function ' +
'twice when loading new data',
async () => {
@@ -1023,7 +1023,7 @@ describe('ReactUse', () => {
},
);
- test('load multiple nested Suspense boundaries', async () => {
+ it('load multiple nested Suspense boundaries', async () => {
const promiseA = getAsyncText('A');
const promiseB = getAsyncText('B');
const promiseC = getAsyncText('C');
@@ -1073,7 +1073,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('ABC');
});
- test('load multiple nested Suspense boundaries (uncached requests)', async () => {
+ it('load multiple nested Suspense boundaries (uncached requests)', async () => {
// This the same as the previous test, except the requests are not cached.
// The tree should still eventually resolve, despite the
// duplicate requests.
@@ -1155,7 +1155,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('ABC');
});
- test('use() combined with render phase updates', async () => {
+ it('use() combined with render phase updates', async () => {
function Async() {
const a = use(Promise.resolve('A'));
const [count, setCount] = useState(0);
@@ -1184,7 +1184,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('A1');
});
- test('basic promise as child', async () => {
+ it('basic promise as child', async () => {
const promise = Promise.resolve();
const root = ReactNoop.createRoot();
await act(() => {
@@ -1196,7 +1196,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('Hi');
});
- test('basic async component', async () => {
+ it('basic async component', async () => {
async function App() {
await getAsyncText('Hi');
return ;
@@ -1220,7 +1220,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('Hi');
});
- test('async child of a non-function component (e.g. a class)', async () => {
+ it('async child of a non-function component (e.g. a class)', async () => {
class App extends React.Component {
async render() {
const text = await getAsyncText('Hi');
@@ -1248,7 +1248,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('Hi');
});
- test('async children are recursively unwrapped', async () => {
+ it('async children are recursively unwrapped', async () => {
// This is a Usable of a Usable. `use` would only unwrap a single level, but
// when passed as a child, the reconciler recurisvely unwraps until it
// resolves to a non-Usable value.
@@ -1269,7 +1269,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('Hi');
});
- test('async children are transparently unwrapped before being reconciled (top level)', async () => {
+ it('async children are transparently unwrapped before being reconciled (top level)', async () => {
function Child({text}) {
useEffect(() => {
Scheduler.log(`Mount: ${text}`);
@@ -1303,7 +1303,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('B');
});
- test('async children are transparently unwrapped before being reconciled (siblings)', async () => {
+ it('async children are transparently unwrapped before being reconciled (siblings)', async () => {
function Child({text}) {
useEffect(() => {
Scheduler.log(`Mount: ${text}`);
@@ -1342,7 +1342,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('ABC');
});
- test('async children are transparently unwrapped before being reconciled (siblings, reordered)', async () => {
+ it('async children are transparently unwrapped before being reconciled (siblings, reordered)', async () => {
function Child({text}) {
useEffect(() => {
Scheduler.log(`Mount: ${text}`);
@@ -1381,7 +1381,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('BAC');
});
- test('basic Context as node', async () => {
+ it('basic Context as node', async () => {
const Context = React.createContext(null);
function Indirection({children}) {
@@ -1463,7 +1463,7 @@ describe('ReactUse', () => {
]);
});
- test('context as node, at the root', async () => {
+ it('context as node, at the root', async () => {
const Context = React.createContext();
const root = ReactNoop.createRoot();
await act(async () => {
@@ -1475,7 +1475,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('Hi');
});
- test('promises that resolves to a context, rendered as a node', async () => {
+ it('promises that resolves to a context, rendered as a node', async () => {
const Context = React.createContext();
const promise = Promise.resolve(Context);
const root = ReactNoop.createRoot();
@@ -1488,7 +1488,7 @@ describe('ReactUse', () => {
expect(root).toMatchRenderedOutput('Hi');
});
- test('unwrap uncached promises inside forwardRef', async () => {
+ it('unwrap uncached promises inside forwardRef', async () => {
const asyncInstance = {};
const Async = React.forwardRef((props, ref) => {
React.useImperativeHandle(ref, () => asyncInstance);
@@ -1516,7 +1516,7 @@ describe('ReactUse', () => {
expect(ref.current).toBe(asyncInstance);
});
- test('unwrap uncached promises inside memo', async () => {
+ it('unwrap uncached promises inside memo', async () => {
const Async = React.memo(
props => {
const text = use(Promise.resolve(props.text));
@@ -1563,7 +1563,7 @@ describe('ReactUse', () => {
});
// @gate !disableLegacyContext
- test('unwrap uncached promises in component that accesses legacy context', async () => {
+ it('unwrap uncached promises in component that accesses legacy context', async () => {
class ContextProvider extends React.Component {
static childContextTypes = {
legacyContext() {},
@@ -1616,7 +1616,7 @@ describe('ReactUse', () => {
);
});
- test('regression test: updates while component is suspended should not be mistaken for render phase updates', async () => {
+ it('regression test: updates while component is suspended should not be mistaken for render phase updates', async () => {
const promiseA = getAsyncText('A');
const promiseB = getAsyncText('B');
const promiseC = getAsyncText('C');
@@ -1657,7 +1657,7 @@ describe('ReactUse', () => {
});
// @gate !forceConcurrentByDefaultForTesting
- test('an async component outside of a Suspense boundary crashes with an error (resolves in microtask)', async () => {
+ it('an async component outside of a Suspense boundary crashes with an error (resolves in microtask)', async () => {
class ErrorBoundary extends React.Component {
state = {error: null};
static getDerivedStateFromError(error) {
@@ -1709,7 +1709,7 @@ describe('ReactUse', () => {
});
// @gate !forceConcurrentByDefaultForTesting
- test('an async component outside of a Suspense boundary crashes with an error (resolves in macrotask)', async () => {
+ it('an async component outside of a Suspense boundary crashes with an error (resolves in macrotask)', async () => {
class ErrorBoundary extends React.Component {
state = {error: null};
static getDerivedStateFromError(error) {
@@ -1761,7 +1761,7 @@ describe('ReactUse', () => {
);
});
- test(
+ it(
'warn if async client component calls a hook (e.g. useState) ' +
'during a non-sync update',
async () => {
@@ -1794,7 +1794,7 @@ describe('ReactUse', () => {
},
);
- test('warn if async client component calls a hook (e.g. use)', async () => {
+ it('warn if async client component calls a hook (e.g. use)', async () => {
const promise = Promise.resolve();
async function AsyncClientComponent() {
@@ -1829,7 +1829,7 @@ describe('ReactUse', () => {
});
// @gate enableAsyncIterableChildren
- test('async generator component', async () => {
+ it('async generator component', async () => {
let hi, world;
async function* App() {
// Only cached promises can be awaited in async generators because
@@ -1874,7 +1874,7 @@ describe('ReactUse', () => {
});
// @gate enableAsyncIterableChildren
- test('async iterable children', async () => {
+ it('async iterable children', async () => {
let hi, world;
const iterable = {
async *[Symbol.asyncIterator]() {
diff --git a/packages/react-reconciler/src/__tests__/useMemoCache-test.js b/packages/react-reconciler/src/__tests__/useMemoCache-test.js
index 280a4458894f0..a3dbeeb38ce1c 100644
--- a/packages/react-reconciler/src/__tests__/useMemoCache-test.js
+++ b/packages/react-reconciler/src/__tests__/useMemoCache-test.js
@@ -57,7 +57,7 @@ describe('useMemoCache()', () => {
});
// @gate enableUseMemoCacheHook
- test('render component using cache', async () => {
+ it('render component using cache', async () => {
function Component(props) {
const cache = useMemoCache(1);
expect(Array.isArray(cache)).toBe(true);
@@ -74,7 +74,7 @@ describe('useMemoCache()', () => {
});
// @gate enableUseMemoCacheHook
- test('update component using cache', async () => {
+ it('update component using cache', async () => {
let setX;
let forceUpdate;
function Component(props) {
@@ -144,7 +144,7 @@ describe('useMemoCache()', () => {
});
// @gate enableUseMemoCacheHook
- test('update component using cache with setstate during render', async () => {
+ it('update component using cache with setstate during render', async () => {
let setN;
function Component(props) {
const cache = useMemoCache(5);
@@ -209,7 +209,7 @@ describe('useMemoCache()', () => {
});
// @gate enableUseMemoCacheHook
- test('update component using cache with throw during render', async () => {
+ it('update component using cache with throw during render', async () => {
let setN;
let shouldFail = true;
function Component(props) {
@@ -292,7 +292,7 @@ describe('useMemoCache()', () => {
});
// @gate enableUseMemoCacheHook
- test('update component and custom hook with caches', async () => {
+ it('update component and custom hook with caches', async () => {
let setX;
let forceUpdate;
function Component(props) {
@@ -369,7 +369,7 @@ describe('useMemoCache()', () => {
});
// @gate enableUseMemoCacheHook
- test('reuses computations from suspended/interrupted render attempts during an update', async () => {
+ it('reuses computations from suspended/interrupted render attempts during an update', async () => {
// This test demonstrates the benefit of a shared memo cache. By "shared" I
// mean multiple concurrent render attempts of the same component/hook use
// the same cache. (When the feature flag is off, we don't do this — the
diff --git a/packages/react-reconciler/src/__tests__/useSyncExternalStore-test.js b/packages/react-reconciler/src/__tests__/useSyncExternalStore-test.js
index 67cefa180aa74..3493c001c4304 100644
--- a/packages/react-reconciler/src/__tests__/useSyncExternalStore-test.js
+++ b/packages/react-reconciler/src/__tests__/useSyncExternalStore-test.js
@@ -82,7 +82,7 @@ describe('useSyncExternalStore', () => {
};
}
- test(
+ it(
'detects interleaved mutations during a concurrent read before ' +
'layout effects fire',
async () => {
@@ -186,7 +186,7 @@ describe('useSyncExternalStore', () => {
},
);
- test('next value is correctly cached when state is dispatched in render phase', async () => {
+ it('next value is correctly cached when state is dispatched in render phase', async () => {
const store = createExternalStore('value:initial');
function App() {
@@ -215,7 +215,7 @@ describe('useSyncExternalStore', () => {
assertLog(['value:initial']);
});
- test(
+ it(
'regression: suspending in shell after synchronously patching ' +
'up store mutation',
async () => {
diff --git a/packages/react-refresh/src/__tests__/ReactFreshIntegration-test.js b/packages/react-refresh/src/__tests__/ReactFreshIntegration-test.js
index c1e5f308b2202..04f89e5628a67 100644
--- a/packages/react-refresh/src/__tests__/ReactFreshIntegration-test.js
+++ b/packages/react-refresh/src/__tests__/ReactFreshIntegration-test.js
@@ -129,7 +129,7 @@ describe('ReactFreshIntegration', () => {
testJavaScript,
],
['TypeScript syntax', executeTypescript, testTypeScript],
- ])('%s', (language, execute, test) => {
+ ])('%s', (language, execute, runTest) => {
async function render(source) {
const Component = execute(source);
await act(() => {
@@ -175,7 +175,7 @@ describe('ReactFreshIntegration', () => {
expect(ReactFreshRuntime._getMountedRootCount()).toBe(1);
}
- test(render, patch);
+ runTest(render, patch);
});
function testJavaScript(render, patch) {
diff --git a/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMBrowser-test.js b/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMBrowser-test.js
index 1c0d3180ebec1..2d50d6fa427e1 100644
--- a/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMBrowser-test.js
+++ b/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMBrowser-test.js
@@ -192,41 +192,6 @@ describe('ReactFlightDOMBrowser', () => {
});
});
- it('should resolve HTML using W3C streams', async () => {
- function Text({children}) {
- return {children};
- }
- function HTML() {
- return (
-
- hello
- world
-
- );
- }
-
- function App() {
- const model = {
- html: ,
- };
- return model;
- }
-
- const stream = await serverAct(() =>
- ReactServerDOMServer.renderToReadableStream(),
- );
- const response = ReactServerDOMClient.createFromReadableStream(stream);
- const model = await response;
- expect(model).toEqual({
- html: (
-
- hello
- world
-
- ),
- });
- });
-
it('should resolve client components (with async chunks) when referenced in props', async () => {
let resolveClientComponentChunk;
diff --git a/packages/react-test-renderer/src/__tests__/ReactTestRenderer-test.js b/packages/react-test-renderer/src/__tests__/ReactTestRenderer-test.js
index d3bbd294e37c3..e3400b173a21d 100644
--- a/packages/react-test-renderer/src/__tests__/ReactTestRenderer-test.js
+++ b/packages/react-test-renderer/src/__tests__/ReactTestRenderer-test.js
@@ -50,7 +50,7 @@ describe('ReactTestRenderer', () => {
expect(errors[1].message.includes('indexOf is not a function')).toBe(true);
});
- test('find element by prop with suspended content', async () => {
+ it('find element by prop with suspended content', async () => {
const neverResolve = new Promise(() => {});
function TestComp({foo}) {
diff --git a/packages/react/src/__tests__/ReactChildren-test.js b/packages/react/src/__tests__/ReactChildren-test.js
index c4e92c44cccb0..e0045e499b2cc 100644
--- a/packages/react/src/__tests__/ReactChildren-test.js
+++ b/packages/react/src/__tests__/ReactChildren-test.js
@@ -543,7 +543,7 @@ describe('ReactChildren', () => {
expect(mappedChildren[0]).toBe(scopeTester);
});
- it('should be called for each child', () => {
+ it('should be called for each child in array', () => {
const zero = ;
const one = null;
const two = ;
@@ -605,7 +605,7 @@ describe('ReactChildren', () => {
expect(mappedChildren[3]).toEqual();
});
- it('should be called for each child in nested structure', () => {
+ it('should be called for each child in nested structure with mapping', () => {
const zero = ;
const one = null;
const two = ;
@@ -678,7 +678,7 @@ describe('ReactChildren', () => {
expect(mappedChildren[3]).toEqual();
});
- it('should retain key across two mappings', () => {
+ it('should retain key across two mappings with conditions', () => {
const zeroForceKey = ;
const oneForceKey = ;
diff --git a/packages/react/src/__tests__/ReactContextValidator-test.js b/packages/react/src/__tests__/ReactContextValidator-test.js
index 5e79635a68dec..6c552cf8008f1 100644
--- a/packages/react/src/__tests__/ReactContextValidator-test.js
+++ b/packages/react/src/__tests__/ReactContextValidator-test.js
@@ -267,7 +267,7 @@ describe('ReactContextValidator', () => {
expect(childContext.foo).toBe('FOO');
});
- it('should pass next context to lifecycles', async () => {
+ it('should pass next context to lifecycles on update', async () => {
let componentDidMountContext;
let componentDidUpdateContext;
let componentWillReceivePropsContext;
diff --git a/packages/react/src/__tests__/ReactES6Class-test.js b/packages/react/src/__tests__/ReactES6Class-test.js
index e7226dc0bee4e..5441e46c1ebd3 100644
--- a/packages/react/src/__tests__/ReactES6Class-test.js
+++ b/packages/react/src/__tests__/ReactES6Class-test.js
@@ -46,7 +46,7 @@ describe('ReactES6Class', () => {
};
});
- function test(element, expectedTag, expectedClassName) {
+ function runTest(element, expectedTag, expectedClassName) {
ReactDOM.flushSync(() => root.render(element));
expect(container.firstChild).not.toBeNull();
expect(container.firstChild.tagName).toBe(expectedTag);
@@ -92,8 +92,8 @@ describe('ReactES6Class', () => {
return ;
}
}
- test(, 'DIV', 'foo');
- test(, 'DIV', 'bar');
+ runTest(, 'DIV', 'foo');
+ runTest(, 'DIV', 'bar');
});
it('renders based on state using initial values in this.props', () => {
@@ -106,7 +106,7 @@ describe('ReactES6Class', () => {
return ;
}
}
- test(, 'SPAN', 'foo');
+ runTest(, 'SPAN', 'foo');
});
it('renders based on state using props in the constructor', () => {
@@ -126,9 +126,9 @@ describe('ReactES6Class', () => {
}
}
const ref = React.createRef();
- test(, 'DIV', 'foo');
+ runTest(, 'DIV', 'foo');
ReactDOM.flushSync(() => ref.current.changeState());
- test(, 'SPAN', 'bar');
+ runTest(, 'SPAN', 'bar');
});
it('sets initial state with value returned by static getDerivedStateFromProps', () => {
@@ -144,7 +144,7 @@ describe('ReactES6Class', () => {
return ;
}
}
- test(, 'DIV', 'foo bar');
+ runTest(, 'DIV', 'foo bar');
});
it('warns if getDerivedStateFromProps is not static', () => {
@@ -233,7 +233,7 @@ describe('ReactES6Class', () => {
return ;
}
}
- test(, 'DIV', 'not-foo bar');
+ runTest(, 'DIV', 'not-foo bar');
});
it('renders updated state with values returned by static getDerivedStateFromProps', () => {
@@ -253,8 +253,8 @@ describe('ReactES6Class', () => {
return ;
}
}
- test(, 'DIV', 'initial');
- test(, 'DIV', 'updated');
+ runTest(, 'DIV', 'initial');
+ runTest(, 'DIV', 'updated');
});
if (!require('shared/ReactFeatureFlags').disableLegacyContext) {
@@ -286,7 +286,7 @@ describe('ReactES6Class', () => {
tag: PropTypes.string,
className: PropTypes.string,
};
- test(, 'SPAN', 'foo');
+ runTest(, 'SPAN', 'foo');
});
}
@@ -305,7 +305,7 @@ describe('ReactES6Class', () => {
return ;
}
}
- test(, 'SPAN', 'bar');
+ runTest(, 'SPAN', 'bar');
expect(renderCount).toBe(1);
});
@@ -320,7 +320,7 @@ describe('ReactES6Class', () => {
return ;
}
}
- expect(() => test(, 'SPAN', '')).toErrorDev(
+ expect(() => runTest(, 'SPAN', '')).toErrorDev(
'Foo.state: must be set to an object or null',
);
});
@@ -336,7 +336,7 @@ describe('ReactES6Class', () => {
return ;
}
}
- test(, 'SPAN', '');
+ runTest(, 'SPAN', '');
});
it('setState through an event handler', () => {
@@ -354,7 +354,7 @@ describe('ReactES6Class', () => {
);
}
}
- test(, 'DIV', 'foo');
+ runTest(, 'DIV', 'foo');
ReactDOM.flushSync(() => attachedListener());
expect(renderedName).toBe('bar');
@@ -373,7 +373,7 @@ describe('ReactES6Class', () => {
return ;
}
}
- test(, 'DIV', 'foo');
+ runTest(, 'DIV', 'foo');
expect(attachedListener).toThrow();
});
@@ -396,7 +396,7 @@ describe('ReactES6Class', () => {
);
}
}
- test(, 'DIV', 'foo');
+ runTest(, 'DIV', 'foo');
ReactDOM.flushSync(() => attachedListener());
expect(renderedName).toBe('bar');
});
@@ -434,10 +434,10 @@ describe('ReactES6Class', () => {
return ;
}
}
- test(, 'SPAN', 'foo');
+ runTest(, 'SPAN', 'foo');
expect(lifeCycles).toEqual(['will-mount', 'did-mount']);
lifeCycles = []; // reset
- test(, 'SPAN', 'bar');
+ runTest(, 'SPAN', 'bar');
// prettier-ignore
expect(lifeCycles).toEqual([
'receive-props', freeze({value: 'bar'}),
@@ -474,7 +474,7 @@ describe('ReactES6Class', () => {
}
}
- expect(() => test(, 'SPAN', 'foo')).toErrorDev([
+ expect(() => runTest(, 'SPAN', 'foo')).toErrorDev([
'getInitialState was defined on Foo, a plain JavaScript class.',
'getDefaultProps was defined on Foo, a plain JavaScript class.',
'propTypes was defined as an instance property on Foo.',
@@ -496,7 +496,7 @@ describe('ReactES6Class', () => {
return ;
}
}
- test(, 'SPAN', 'foo');
+ runTest(, 'SPAN', 'foo');
});
it('should warn when misspelling shouldComponentUpdate', () => {
@@ -509,7 +509,7 @@ describe('ReactES6Class', () => {
}
}
- expect(() => test(, 'SPAN', 'foo')).toErrorDev(
+ expect(() => runTest(, 'SPAN', 'foo')).toErrorDev(
'Warning: ' +
'NamedComponent has a method called componentShouldUpdate(). Did you ' +
'mean shouldComponentUpdate()? The name is phrased as a question ' +
@@ -527,7 +527,7 @@ describe('ReactES6Class', () => {
}
}
- expect(() => test(, 'SPAN', 'foo')).toErrorDev(
+ expect(() => runTest(, 'SPAN', 'foo')).toErrorDev(
'Warning: ' +
'NamedComponent has a method called componentWillRecieveProps(). Did ' +
'you mean componentWillReceiveProps()?',
@@ -544,7 +544,7 @@ describe('ReactES6Class', () => {
}
}
- expect(() => test(, 'SPAN', 'foo')).toErrorDev(
+ expect(() => runTest(, 'SPAN', 'foo')).toErrorDev(
'Warning: ' +
'NamedComponent has a method called UNSAFE_componentWillRecieveProps(). ' +
'Did you mean UNSAFE_componentWillReceiveProps()?',
@@ -553,7 +553,7 @@ describe('ReactES6Class', () => {
it('should throw AND warn when trying to access classic APIs', () => {
const ref = React.createRef();
- test(, 'DIV', 'foo');
+ runTest(, 'DIV', 'foo');
expect(() =>
expect(() => ref.current.replaceState({})).toThrow(),
).toWarnDev(
@@ -583,7 +583,7 @@ describe('ReactES6Class', () => {
}
}
Foo.childContextTypes = {bar: PropTypes.string};
- test(, 'DIV', 'bar-through-context');
+ runTest(, 'DIV', 'bar-through-context');
});
}
@@ -596,7 +596,7 @@ describe('ReactES6Class', () => {
}
const ref = React.createRef();
expect(() => {
- test(, 'DIV', 'foo');
+ runTest(, 'DIV', 'foo');
}).toErrorDev([
'Warning: Component "Foo" contains the string ref "inner". ' +
'Support for string refs will be removed in a future major release. ' +
diff --git a/packages/react/src/__tests__/ReactMismatchedVersions-test.js b/packages/react/src/__tests__/ReactMismatchedVersions-test.js
index 602b71476d2af..234df6c8e4833 100644
--- a/packages/react/src/__tests__/ReactMismatchedVersions-test.js
+++ b/packages/react/src/__tests__/ReactMismatchedVersions-test.js
@@ -37,7 +37,7 @@ describe('ReactMismatchedVersions-test', () => {
actualReactVersion = React.__actualVersion;
});
- test('importing "react-dom/client" throws if version does not match React version', async () => {
+ it('importing "react-dom/client" throws if version does not match React version', async () => {
expect(() => require('react-dom/client')).toThrow(
'Incompatible React versions: The "react" and "react-dom" packages ' +
'must have the exact same version. Instead got:\n' +
@@ -51,7 +51,7 @@ describe('ReactMismatchedVersions-test', () => {
// only errors once you call something and trigger the require. Running the
// test in build mode is sufficient.
// @gate !source
- test('importing "react-dom/server" throws if version does not match React version', async () => {
+ it('importing "react-dom/server" throws if version does not match React version', async () => {
expect(() => require('react-dom/server')).toThrow(
'Incompatible React versions: The "react" and "react-dom" packages ' +
'must have the exact same version. Instead got:\n' +
@@ -61,7 +61,7 @@ describe('ReactMismatchedVersions-test', () => {
});
// @gate !source
- test('importing "react-dom/server.node" throws if version does not match React version', async () => {
+ it('importing "react-dom/server.node" throws if version does not match React version', async () => {
expect(() => require('react-dom/server.node')).toThrow(
'Incompatible React versions: The "react" and "react-dom" packages ' +
'must have the exact same version. Instead got:\n' +
@@ -71,7 +71,7 @@ describe('ReactMismatchedVersions-test', () => {
});
// @gate !source
- test('importing "react-dom/server.browser" throws if version does not match React version', async () => {
+ it('importing "react-dom/server.browser" throws if version does not match React version', async () => {
expect(() => require('react-dom/server.browser')).toThrow(
'Incompatible React versions: The "react" and "react-dom" packages ' +
'must have the exact same version. Instead got:\n' +
@@ -81,7 +81,7 @@ describe('ReactMismatchedVersions-test', () => {
});
// @gate !source
- test('importing "react-dom/server.bun" throws if version does not match React version', async () => {
+ it('importing "react-dom/server.bun" throws if version does not match React version', async () => {
expect(() => require('react-dom/server.bun')).toThrow(
'Incompatible React versions: The "react" and "react-dom" packages ' +
'must have the exact same version. Instead got:\n' +
@@ -91,7 +91,7 @@ describe('ReactMismatchedVersions-test', () => {
});
// @gate !source
- test('importing "react-dom/server.edge" throws if version does not match React version', async () => {
+ it('importing "react-dom/server.edge" throws if version does not match React version', async () => {
expect(() => require('react-dom/server.edge')).toThrow(
'Incompatible React versions: The "react" and "react-dom" packages ' +
'must have the exact same version. Instead got:\n' +
@@ -100,7 +100,7 @@ describe('ReactMismatchedVersions-test', () => {
);
});
- test('importing "react-dom/static" throws if version does not match React version', async () => {
+ it('importing "react-dom/static" throws if version does not match React version', async () => {
expect(() => require('react-dom/static')).toThrow(
'Incompatible React versions: The "react" and "react-dom" packages ' +
'must have the exact same version. Instead got:\n' +
@@ -109,7 +109,7 @@ describe('ReactMismatchedVersions-test', () => {
);
});
- test('importing "react-dom/static.node" throws if version does not match React version', async () => {
+ it('importing "react-dom/static.node" throws if version does not match React version', async () => {
expect(() => require('react-dom/static.node')).toThrow(
'Incompatible React versions: The "react" and "react-dom" packages ' +
'must have the exact same version. Instead got:\n' +
@@ -118,7 +118,7 @@ describe('ReactMismatchedVersions-test', () => {
);
});
- test('importing "react-dom/static.browser" throws if version does not match React version', async () => {
+ it('importing "react-dom/static.browser" throws if version does not match React version', async () => {
expect(() => require('react-dom/static.browser')).toThrow(
'Incompatible React versions: The "react" and "react-dom" packages ' +
'must have the exact same version. Instead got:\n' +
@@ -127,7 +127,7 @@ describe('ReactMismatchedVersions-test', () => {
);
});
- test('importing "react-dom/static.edge" throws if version does not match React version', async () => {
+ it('importing "react-dom/static.edge" throws if version does not match React version', async () => {
expect(() => require('react-dom/static.edge')).toThrow(
'Incompatible React versions: The "react" and "react-dom" packages ' +
'must have the exact same version. Instead got:\n' +
@@ -137,7 +137,7 @@ describe('ReactMismatchedVersions-test', () => {
});
// @gate source
- test('importing "react-native-renderer" throws if version does not match React version', async () => {
+ it('importing "react-native-renderer" throws if version does not match React version', async () => {
expect(() => require('react-native-renderer')).toThrow(
'Incompatible React versions: The "react" and "react-native-renderer" packages ' +
'must have the exact same version. Instead got:\n' +
diff --git a/packages/react/src/__tests__/ReactStrictMode-test.js b/packages/react/src/__tests__/ReactStrictMode-test.js
index d9d6815b88e5a..c36cdf15ed2fc 100644
--- a/packages/react/src/__tests__/ReactStrictMode-test.js
+++ b/packages/react/src/__tests__/ReactStrictMode-test.js
@@ -438,7 +438,7 @@ describe('ReactStrictMode', () => {
});
// @gate debugRenderPhaseSideEffectsForStrictMode
- it('double invokes useMemo functions', async () => {
+ it('double invokes useMemo functions with first result', async () => {
let log = [];
function Uppercased({text}) {
const memoizedResult = useMemo(() => {
@@ -1008,45 +1008,6 @@ describe('string refs', () => {
root.render();
});
});
-
- // @gate !disableStringRefs
- it('should warn within a strict tree', async () => {
- const {StrictMode} = React;
-
- class OuterComponent extends React.Component {
- render() {
- return (
-
-
-
- );
- }
- }
-
- class InnerComponent extends React.Component {
- render() {
- return null;
- }
- }
-
- const container = document.createElement('div');
- const root = ReactDOMClient.createRoot(container);
- await expect(async () => {
- await act(() => {
- root.render();
- });
- }).toErrorDev(
- 'Warning: Component "OuterComponent" contains the string ref "somestring". ' +
- 'Support for string refs will be removed in a future major release. ' +
- 'We recommend using useRef() or createRef() instead. ' +
- 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' +
- ' in InnerComponent (at **)',
- );
-
- await act(() => {
- root.render();
- });
- });
});
describe('context legacy', () => {
diff --git a/packages/react/src/__tests__/createReactClassIntegration-test.js b/packages/react/src/__tests__/createReactClassIntegration-test.js
index cfdc7174c7ba9..0785d5aa70971 100644
--- a/packages/react/src/__tests__/createReactClassIntegration-test.js
+++ b/packages/react/src/__tests__/createReactClassIntegration-test.js
@@ -198,7 +198,8 @@ describe('create-react-class-integration', () => {
});
// TODO: Consider actually moving these to statics or drop this unit test.
- xit('should warn when using deprecated non-static spec keys', () => {
+ // eslint-disable-next-line jest/no-disabled-tests
+ it.skip('should warn when using deprecated non-static spec keys', () => {
expect(() =>
createReactClass({
mixins: [{}],
diff --git a/packages/scheduler/src/__tests__/SchedulerMock-test.js b/packages/scheduler/src/__tests__/SchedulerMock-test.js
index d71957ef3ebae..a9bd0bdc5c1eb 100644
--- a/packages/scheduler/src/__tests__/SchedulerMock-test.js
+++ b/packages/scheduler/src/__tests__/SchedulerMock-test.js
@@ -444,6 +444,7 @@ describe('Scheduler', () => {
// priority if you have sourcemaps.
// TODO: Feature temporarily disabled while we investigate a bug in one of
// our minifiers.
+ // eslint-disable-next-line jest/no-disabled-tests
it.skip('adds extra function to the JS stack whose name includes the priority level', async () => {
function inferPriorityFromCallstack() {
try {
diff --git a/packages/scheduler/src/__tests__/SchedulerSetImmediate-test.js b/packages/scheduler/src/__tests__/SchedulerSetImmediate-test.js
index bf521b15d3664..12257ee5076a0 100644
--- a/packages/scheduler/src/__tests__/SchedulerSetImmediate-test.js
+++ b/packages/scheduler/src/__tests__/SchedulerSetImmediate-test.js
@@ -288,7 +288,7 @@ describe('SchedulerDOMSetImmediate', () => {
});
});
-it('does not crash if setImmediate is undefined', () => {
+test('does not crash if setImmediate is undefined', () => {
jest.resetModules();
const originalSetImmediate = global.setImmediate;
try {
diff --git a/packages/use-sync-external-store/src/__tests__/useSyncExternalStoreNative-test.js b/packages/use-sync-external-store/src/__tests__/useSyncExternalStoreNative-test.js
index 24d9e96d29d5c..cb4e91ddc4882 100644
--- a/packages/use-sync-external-store/src/__tests__/useSyncExternalStoreNative-test.js
+++ b/packages/use-sync-external-store/src/__tests__/useSyncExternalStoreNative-test.js
@@ -104,7 +104,7 @@ describe('useSyncExternalStore (userspace shim, server rendering)', () => {
};
}
- test('native version', async () => {
+ it('native version', async () => {
const store = createExternalStore('client');
function App() {
@@ -124,7 +124,7 @@ describe('useSyncExternalStore (userspace shim, server rendering)', () => {
expect(root).toMatchRenderedOutput('client');
});
- test('Using isEqual to bailout', async () => {
+ it('Using isEqual to bailout', async () => {
const store = createExternalStore({a: 0, b: 0});
function A() {
diff --git a/packages/use-sync-external-store/src/__tests__/useSyncExternalStoreShimServer-test.js b/packages/use-sync-external-store/src/__tests__/useSyncExternalStoreShimServer-test.js
index 6eacb9a99c606..94256283728b3 100644
--- a/packages/use-sync-external-store/src/__tests__/useSyncExternalStoreShimServer-test.js
+++ b/packages/use-sync-external-store/src/__tests__/useSyncExternalStoreShimServer-test.js
@@ -81,7 +81,7 @@ describe('useSyncExternalStore (userspace shim, server rendering)', () => {
};
}
- test('basic server render', async () => {
+ it('basic server render', async () => {
const store = createExternalStore('client');
function App() {
diff --git a/scripts/babel/__tests__/transform-test-gate-pragma-test.js b/scripts/babel/__tests__/transform-test-gate-pragma-test.js
index e4b76dd05e859..f4abf54bec0e2 100644
--- a/scripts/babel/__tests__/transform-test-gate-pragma-test.js
+++ b/scripts/babel/__tests__/transform-test-gate-pragma-test.js
@@ -10,7 +10,8 @@ describe('transform-test-gate-pragma', () => {
// Fake runtime
// eslint-disable-next-line no-unused-vars
const _test_gate = (gateFn, testName, cb) => {
- test(testName, (...args) => {
+ // eslint-disable-next-line jest/no-done-callback, jest/valid-title
+ it(testName, (...args) => {
shouldPass = gateFn(context);
return cb(...args);
});
@@ -21,7 +22,8 @@ describe('transform-test-gate-pragma', () => {
// NOTE: Tests in this file are not actually focused because the calls to
// `test.only` and `fit` are compiled to `_test_gate_focus`. So if you want
// to focus something, swap the following `test` call for `test.only`.
- test(testName, (...args) => {
+ // eslint-disable-next-line jest/no-done-callback, jest/valid-title
+ it(testName, (...args) => {
shouldPass = gateFn(context);
isFocused = true;
return cb(...args);
@@ -43,34 +45,34 @@ describe('transform-test-gate-pragma', () => {
isFocused = false;
});
- test('no pragma', () => {
+ it('no pragma', () => {
expect(shouldPass).toBe(null);
});
// unrelated comment
- test('no pragma, unrelated comment', () => {
+ it('no pragma, unrelated comment', () => {
expect(shouldPass).toBe(null);
});
// @gate flagThatIsOn
- test('basic positive test', () => {
+ it('basic positive test', () => {
expect(shouldPass).toBe(true);
});
// @gate flagThatIsOff
- test('basic negative test', () => {
+ it('basic negative test', () => {
expect(shouldPass).toBe(false);
});
// @gate flagThatIsOn
- it('it method', () => {
+ it('method', () => {
expect(shouldPass).toBe(true);
});
/* eslint-disable jest/no-focused-tests */
// @gate flagThatIsOn
- test.only('test.only', () => {
+ it.only('test.only', () => {
expect(isFocused).toBe(true);
expect(shouldPass).toBe(true);
});
@@ -82,7 +84,7 @@ describe('transform-test-gate-pragma', () => {
});
// @gate flagThatIsOn
- fit('fit', () => {
+ it.only('fit', () => {
expect(isFocused).toBe(true);
expect(shouldPass).toBe(true);
});
@@ -90,79 +92,79 @@ describe('transform-test-gate-pragma', () => {
/* eslint-enable jest/no-focused-tests */
// @gate !flagThatIsOff
- test('flag negation', () => {
+ it('flag negation', () => {
expect(shouldPass).toBe(true);
});
// @gate flagThatIsOn
// @gate !flagThatIsOff
- test('multiple gates', () => {
+ it('multiple gates', () => {
expect(shouldPass).toBe(true);
});
// @gate flagThatIsOn
// @gate flagThatIsOff
- test('multiple gates 2', () => {
+ it('multiple gates 2', () => {
expect(shouldPass).toBe(false);
});
// @gate !flagThatIsOff && flagThatIsOn
- test('&&', () => {
+ it('&&', () => {
expect(shouldPass).toBe(true);
});
// @gate flagThatIsOff || flagThatIsOn
- test('||', () => {
+ it('||', () => {
expect(shouldPass).toBe(true);
});
// @gate (flagThatIsOn || flagThatIsOff) && flagThatIsOn
- test('groups', () => {
+ it('groups', () => {
expect(shouldPass).toBe(true);
});
// @gate flagThatIsOn == !flagThatIsOff
- test('==', () => {
+ it('==', () => {
expect(shouldPass).toBe(true);
});
// @gate flagThatIsOn === !flagThatIsOff
- test('===', () => {
+ it('===', () => {
expect(shouldPass).toBe(true);
});
// @gate flagThatIsOn != !flagThatIsOff
- test('!=', () => {
+ it('!=', () => {
expect(shouldPass).toBe(false);
});
// @gate flagThatIsOn != !flagThatIsOff
- test('!==', () => {
+ it('!==', () => {
expect(shouldPass).toBe(false);
});
// @gate flagThatIsOn === true
- test('true', () => {
+ it('true', () => {
expect(shouldPass).toBe(true);
});
// @gate flagThatIsOff === false
- test('false', () => {
+ it('false', () => {
expect(shouldPass).toBe(true);
});
// @gate environment === "fake-environment"
- test('double quoted strings', () => {
+ it('double quoted strings', () => {
expect(shouldPass).toBe(true);
});
// @gate environment === 'fake-environment'
- test('single quoted strings', () => {
+ it('single quoted strings', () => {
expect(shouldPass).toBe(true);
});
// @gate flagThatIsOn // This is a comment
- test('line comment', () => {
+ it('line comment', () => {
expect(shouldPass).toBe(true);
});
});
@@ -172,14 +174,14 @@ describe('transform test-gate-pragma: actual runtime', () => {
// test suite.
// @gate __DEV__
- test('__DEV__', () => {
+ it('__DEV__', () => {
if (!__DEV__) {
throw Error("Doesn't work in production!");
}
});
// @gate build === "development"
- test('strings', () => {
+ it('strings', () => {
if (!__DEV__) {
throw Error("Doesn't work in production!");
}
@@ -187,25 +189,25 @@ describe('transform test-gate-pragma: actual runtime', () => {
// Always should fail because of the unguarded console.error
// @gate false
- test('works with console.error tracking', () => {
+ it('works with console.error tracking', () => {
console.error('Should cause test to fail');
});
// Always should fail because of the unguarded console.warn
// @gate false
- test('works with console.warn tracking', () => {
+ it('works with console.warn tracking', () => {
console.warn('Should cause test to fail');
});
// @gate false
- test('works with console tracking if error is thrown before end of test', () => {
+ it('works with console tracking if error is thrown before end of test', () => {
console.warn('Please stop that!');
console.error('Stop that!');
throw Error('I told you to stop!');
});
// @gate false
- test('a global error event is treated as a test failure', () => {
+ it('a global error event is treated as a test failure', () => {
dispatchEvent(
new ErrorEvent('error', {
error: new Error('Oops!'),
@@ -216,7 +218,7 @@ describe('transform test-gate-pragma: actual runtime', () => {
describe('dynamic gate method', () => {
// @gate experimental && __DEV__
- test('returns same conditions as pragma', () => {
+ it('returns same conditions as pragma', () => {
expect(gate(ctx => ctx.experimental && ctx.__DEV__)).toBe(true);
});
});
diff --git a/yarn.lock b/yarn.lock
index a72923e5c175e..1f3a2dd01d434 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2206,7 +2206,7 @@
opn "5.3.0"
react "^16.13.1"
-"@eslint-community/eslint-utils@^4.2.0":
+"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0":
version "4.4.0"
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
@@ -3222,6 +3222,11 @@
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3"
integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==
+"@types/json-schema@^7.0.12":
+ version "7.0.15"
+ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841"
+ integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==
+
"@types/json-schema@^7.0.3":
version "7.0.3"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636"
@@ -3310,6 +3315,11 @@
resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d"
integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==
+"@types/semver@^7.5.0":
+ version "7.5.8"
+ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e"
+ integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==
+
"@types/send@*":
version "0.17.1"
resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.1.tgz#ed4932b8a2a805f1fe362a70f4e62d0ac994e301"
@@ -3404,15 +3414,6 @@
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"
-"@typescript-eslint/experimental-utils@^1.13.0":
- version "1.13.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.13.0.tgz#b08c60d780c0067de2fb44b04b432f540138301e"
- integrity sha512-zmpS6SyqG4ZF64ffaJ6uah6tWWWgZ8m+c54XXgwFtUv0jNz8aJAVx8chMCvnk7yl6xwn8d+d96+tWp7fXzTuDg==
- dependencies:
- "@types/json-schema" "^7.0.3"
- "@typescript-eslint/typescript-estree" "1.13.0"
- eslint-scope "^4.0.0"
-
"@typescript-eslint/parser-v2@npm:@typescript-eslint/parser@^2.26.0":
version "2.34.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.34.0.tgz#50252630ca319685420e9a39ca05fe185a256bc8"
@@ -3470,6 +3471,14 @@
"@typescript-eslint/types" "5.0.0-alpha.25+faf2d1d2"
"@typescript-eslint/visitor-keys" "5.0.0-alpha.25+faf2d1d2"
+"@typescript-eslint/scope-manager@6.21.0":
+ version "6.21.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz#ea8a9bfc8f1504a6ac5d59a6df308d3a0630a2b1"
+ integrity sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==
+ dependencies:
+ "@typescript-eslint/types" "6.21.0"
+ "@typescript-eslint/visitor-keys" "6.21.0"
+
"@typescript-eslint/types@3.10.1":
version "3.10.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.10.1.tgz#1d7463fa7c32d8a23ab508a803ca2fe26e758727"
@@ -3485,13 +3494,10 @@
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.0.0-alpha.25.tgz#2c5aaaee8d41d08fbb91193cc6df482374700b2e"
integrity sha512-M9PZ+m1vD+UaBt+9hJ1bXTA94s4fvY3fOQkwYxrtreqqdzaiNcW8F5GAO3dthzmS+6II+XAsWfCQzCoBvoiOrw==
-"@typescript-eslint/typescript-estree@1.13.0":
- version "1.13.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.13.0.tgz#8140f17d0f60c03619798f1d628b8434913dc32e"
- integrity sha512-b5rCmd2e6DCC6tCTN9GSUAuxdYwCM/k/2wdjHGrIRGPSJotWMCe/dGpi66u42bhuh8q3QBzqM4TMA1GUUCJvdw==
- dependencies:
- lodash.unescape "4.0.1"
- semver "5.5.0"
+"@typescript-eslint/types@6.21.0":
+ version "6.21.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d"
+ integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==
"@typescript-eslint/typescript-estree@2.34.0":
version "2.34.0"
@@ -3547,6 +3553,33 @@
semver "^7.3.5"
tsutils "^3.21.0"
+"@typescript-eslint/typescript-estree@6.21.0":
+ version "6.21.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz#c47ae7901db3b8bddc3ecd73daff2d0895688c46"
+ integrity sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==
+ dependencies:
+ "@typescript-eslint/types" "6.21.0"
+ "@typescript-eslint/visitor-keys" "6.21.0"
+ debug "^4.3.4"
+ globby "^11.1.0"
+ is-glob "^4.0.3"
+ minimatch "9.0.3"
+ semver "^7.5.4"
+ ts-api-utils "^1.0.1"
+
+"@typescript-eslint/utils@^6.0.0":
+ version "6.21.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.21.0.tgz#4714e7a6b39e773c1c8e97ec587f520840cd8134"
+ integrity sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==
+ dependencies:
+ "@eslint-community/eslint-utils" "^4.4.0"
+ "@types/json-schema" "^7.0.12"
+ "@types/semver" "^7.5.0"
+ "@typescript-eslint/scope-manager" "6.21.0"
+ "@typescript-eslint/types" "6.21.0"
+ "@typescript-eslint/typescript-estree" "6.21.0"
+ semver "^7.5.4"
+
"@typescript-eslint/visitor-keys@3.10.1":
version "3.10.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz#cd4274773e3eb63b2e870ac602274487ecd1e931"
@@ -3570,6 +3603,14 @@
"@typescript-eslint/types" "5.0.0-alpha.25+faf2d1d2"
eslint-visitor-keys "^3.0.0"
+"@typescript-eslint/visitor-keys@6.21.0":
+ version "6.21.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz#87a99d077aa507e20e238b11d56cc26ade45fe47"
+ integrity sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==
+ dependencies:
+ "@typescript-eslint/types" "6.21.0"
+ eslint-visitor-keys "^3.4.1"
+
"@vercel/build-utils@2.5.1":
version "2.5.1"
resolved "https://registry.yarnpkg.com/@vercel/build-utils/-/build-utils-2.5.1.tgz#2f687c2d82464dd85e0ed8130bc01e5dac9b11a4"
@@ -6365,6 +6406,13 @@ debug@^4.3.1:
dependencies:
ms "2.1.2"
+debug@^4.3.4:
+ version "4.3.5"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e"
+ integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==
+ dependencies:
+ ms "2.1.2"
+
decamelize@3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-3.2.0.tgz#84b8e8f4f8c579f938e35e2cc7024907e0090851"
@@ -7130,12 +7178,12 @@ eslint-plugin-ft-flow@^2.0.3:
lodash "^4.17.21"
string-natural-compare "^3.0.1"
-eslint-plugin-jest@^22.15.0:
- version "22.15.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.15.0.tgz#fe70bfff7eeb47ca0ab229588a867f82bb8592c5"
- integrity sha512-hgnPbSqAIcLLS9ePb12hNHTRkXnkVaCfOwCt2pzQ8KpOKPWGA4HhLMaFN38NBa/0uvLfrZpcIRjT+6tMAfr58Q==
+eslint-plugin-jest@28.4.0:
+ version "28.4.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-28.4.0.tgz#213be88f799a35ca9d63ce1a30081bb32b8da765"
+ integrity sha512-ORVHiFPC8RQxHLyQJ37MxNilK9k+cPzjHz65T8gAbpYZunGutXvKqwfM3WXBCvFDF1QBeYJJu9LB/i5cuXBs+g==
dependencies:
- "@typescript-eslint/experimental-utils" "^1.13.0"
+ "@typescript-eslint/utils" "^6.0.0"
eslint-plugin-no-for-of-loops@^1.0.0:
version "1.0.1"
@@ -7196,7 +7244,7 @@ eslint-scope@5.1.1, eslint-scope@^5.1.1:
esrecurse "^4.3.0"
estraverse "^4.1.1"
-eslint-scope@^4.0.0, eslint-scope@^4.0.3:
+eslint-scope@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848"
integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==
@@ -7337,7 +7385,7 @@ eslint-visitor-keys@^3.0.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.0.0.tgz#e32e99c6cdc2eb063f204eda5db67bfe58bb4186"
integrity sha512-mJOZa35trBTb3IyRmo8xmKBZlxf+N7OnUl4+ZhJHs/r+0770Wh/LEACE2pqMGMe27G/4y8P2bYGk4J70IC5k1Q==
-eslint-visitor-keys@^3.3.0:
+eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1:
version "3.4.3"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800"
integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==
@@ -7800,6 +7848,17 @@ fast-glob@^3.1.1:
micromatch "^4.0.2"
picomatch "^2.2.1"
+fast-glob@^3.2.9:
+ version "3.3.2"
+ resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129"
+ integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==
+ dependencies:
+ "@nodelib/fs.stat" "^2.0.2"
+ "@nodelib/fs.walk" "^1.2.3"
+ glob-parent "^5.1.2"
+ merge2 "^1.3.0"
+ micromatch "^4.0.4"
+
fast-json-patch@^2.0.6:
version "2.2.1"
resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-2.2.1.tgz#18150d36c9ab65c7209e7d4eb113f4f8eaabe6d9"
@@ -8696,6 +8755,18 @@ globby@^11.0.3:
merge2 "^1.3.0"
slash "^3.0.0"
+globby@^11.1.0:
+ version "11.1.0"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b"
+ integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==
+ dependencies:
+ array-union "^2.1.0"
+ dir-glob "^3.0.1"
+ fast-glob "^3.2.9"
+ ignore "^5.2.0"
+ merge2 "^1.4.1"
+ slash "^3.0.0"
+
google-closure-compiler-java@^20230206.0.0:
version "20230206.0.0"
resolved "https://registry.yarnpkg.com/google-closure-compiler-java/-/google-closure-compiler-java-20230206.0.0.tgz#e615c1f17901b7f7906d891f132e2867e8a21019"
@@ -11216,11 +11287,6 @@ lodash.truncate@^4.4.2:
resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193"
integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==
-lodash.unescape@4.0.1:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c"
- integrity sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=
-
lodash.union@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88"
@@ -11500,7 +11566,7 @@ merge-stream@^2.0.0:
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
-merge2@^1.3.0:
+merge2@^1.3.0, merge2@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
@@ -11631,6 +11697,13 @@ minimalistic-assert@^1.0.0:
dependencies:
brace-expansion "^1.1.7"
+minimatch@9.0.3:
+ version "9.0.3"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825"
+ integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==
+ dependencies:
+ brace-expansion "^2.0.1"
+
minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
@@ -14283,11 +14356,6 @@ semver-truncate@^1.1.2:
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
-semver@5.5.0:
- version "5.5.0"
- resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
- integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==
-
semver@7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e"
@@ -15656,6 +15724,11 @@ trim-repeated@^1.0.0:
dependencies:
escape-string-regexp "^1.0.2"
+ts-api-utils@^1.0.1:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1"
+ integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==
+
ts-node@8.9.1:
version "8.9.1"
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.9.1.tgz#2f857f46c47e91dcd28a14e052482eb14cfd65a5"