Skip to content

Commit

Permalink
Link dedicated warning page
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Mar 27, 2024
1 parent 588ebcd commit 6f3b264
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions packages/react-dom/src/__tests__/ReactTestUtils-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ describe('ReactTestUtils', () => {
it('throws', async () => {
expect(ReactTestUtils.Simulate.click).toThrow(
'`Simulate` was removed from `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-test-renderer for more info.',
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
});
});
Expand Down Expand Up @@ -629,7 +629,7 @@ describe('ReactTestUtils', () => {
it('throws on every removed function', async () => {
expect(ReactTestUtils.isDOMComponent).toThrow(
'`isDOMComponent` was removed from `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-test-renderer for more info.',
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
});
});
34 changes: 17 additions & 17 deletions packages/react-dom/src/test-utils/ReactTestUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function renderIntoDocument(element) {
if (disableDOMTestUtils) {
throw new Error(
'`renderIntoDocument` was removed from `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-test-renderer for more info.',
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
}

Expand All @@ -147,7 +147,7 @@ function isElement(element) {
if (disableDOMTestUtils) {
throw new Error(
'`isElement` was removed from `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-test-renderer for more info.',
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
}

Expand All @@ -158,7 +158,7 @@ function isElementOfType(inst, convenienceConstructor) {
if (disableDOMTestUtils) {
throw new Error(
'`isElementOfType` was removed from `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-test-renderer for more info.',
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
}

Expand All @@ -169,7 +169,7 @@ function isDOMComponent(inst) {
if (disableDOMTestUtils) {
throw new Error(
'`isDOMComponent` was removed from `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-test-renderer for more info.',
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
}

Expand All @@ -180,7 +180,7 @@ function isDOMComponentElement(inst) {
if (disableDOMTestUtils) {
throw new Error(
'`isDOMComponentElement` was removed from `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-test-renderer for more info.',
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
}

Expand All @@ -191,7 +191,7 @@ function isCompositeComponent(inst) {
if (disableDOMTestUtils) {
throw new Error(
'`isCompositeComponent` was removed from `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-test-renderer for more info.',
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
}

Expand All @@ -211,7 +211,7 @@ function isCompositeComponentWithType(inst, type) {
if (disableDOMTestUtils) {
throw new Error(
'`isCompositeComponentWithType` was removed from `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-test-renderer for more info.',
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
}

Expand All @@ -227,7 +227,7 @@ function findAllInRenderedTree(inst, test) {
if (disableDOMTestUtils) {
throw new Error(
'`findAllInRenderedTree` was removed from `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-test-renderer for more info.',
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
}

Expand All @@ -248,7 +248,7 @@ function scryRenderedDOMComponentsWithClass(root, classNames) {
if (disableDOMTestUtils) {
throw new Error(
'`scryRenderedDOMComponentsWithClass` was removed from `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-test-renderer for more info.',
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
}

Expand Down Expand Up @@ -290,7 +290,7 @@ function findRenderedDOMComponentWithClass(root, className) {
if (disableDOMTestUtils) {
throw new Error(
'`findRenderedDOMComponentWithClass` was removed from `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-test-renderer for more info.',
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
}

Expand All @@ -317,7 +317,7 @@ function scryRenderedDOMComponentsWithTag(root, tagName) {
if (disableDOMTestUtils) {
throw new Error(
'`scryRenderedDOMComponentsWithTag` was removed from `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-test-renderer for more info.',
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
}

Expand All @@ -340,7 +340,7 @@ function findRenderedDOMComponentWithTag(root, tagName) {
if (disableDOMTestUtils) {
throw new Error(
'`findRenderedDOMComponentWithTag` was removed from `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-test-renderer for more info.',
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
}

Expand All @@ -366,7 +366,7 @@ function scryRenderedComponentsWithType(root, componentType) {
if (disableDOMTestUtils) {
throw new Error(
'`scryRenderedComponentsWithType` was removed from `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-test-renderer for more info.',
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
}

Expand All @@ -386,7 +386,7 @@ function findRenderedComponentWithType(root, componentType) {
if (disableDOMTestUtils) {
throw new Error(
'`findRenderedComponentWithType` was removed from `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-test-renderer for more info.',
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
}

Expand Down Expand Up @@ -421,7 +421,7 @@ function mockComponent(module, mockTagName) {
if (disableDOMTestUtils) {
throw new Error(
'`mockComponent` was removed from `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-test-renderer for more info.',
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
}

Expand Down Expand Up @@ -449,7 +449,7 @@ function nativeTouchData(x, y) {
if (disableDOMTestUtils) {
throw new Error(
'`nativeTouchData` was removed from `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-test-renderer for more info.',
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
}

Expand Down Expand Up @@ -694,7 +694,7 @@ function makeSimulator(eventType) {
if (disableDOMTestUtils) {
throw new Error(
'`Simulate` was removed from `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-test-renderer for more info.',
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
}

Expand Down

0 comments on commit 6f3b264

Please sign in to comment.