Skip to content

Commit a337258

Browse files
docs: translate react-dom-test-utils.md to Русский
1 parent 2958f53 commit a337258

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
---
2-
title: react-dom/test-utils Deprecation Warnings
2+
title: react-dom/test-utils Предупреждения об устаревании
33
---
44

5-
## ReactDOMTestUtils.act() warning {/*reactdomtestutilsact-warning*/}
5+
## Предупреждение ReactDOMTestUtils.act() {/*reactdomtestutilsact-warning*/}
66

7-
`act` from `react-dom/test-utils` has been deprecated in favor of `act` from `react`.
7+
`act` из `react-dom/test-utils` устарел и заменен на `act` из `react`.
88

9-
Before:
9+
До:
1010

1111
```js
1212
import {act} from 'react-dom/test-utils';
1313
```
1414

15-
After:
15+
После:
1616

1717
```js
1818
import {act} from 'react';
1919
```
2020

21-
## Rest of ReactDOMTestUtils APIS {/*rest-of-reactdomtestutils-apis*/}
21+
## Остальные API ReactDOMTestUtils {/*rest-of-reactdomtestutils-apis*/}
2222

23-
All APIs except `act` have been removed.
23+
Все API, кроме `act`, были удалены.
2424

25-
The React Team recommends migrating your tests to [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/) for a modern and well supported testing experience.
25+
Команда React рекомендует мигрировать ваши тесты на [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/) для современного и хорошо поддерживаемого опыта тестирования.
2626

2727
### ReactDOMTestUtils.renderIntoDocument {/*reactdomtestutilsrenderintodocument*/}
2828

29-
`renderIntoDocument` can be replaced with `render` from `@testing-library/react`.
29+
`renderIntoDocument` можно заменить на `render` из `@testing-library/react`.
3030

31-
Before:
31+
До:
3232

3333
```js
3434
import {renderIntoDocument} from 'react-dom/test-utils';
3535

3636
renderIntoDocument(<Component />);
3737
```
3838

39-
After:
39+
После:
4040

4141
```js
4242
import {render} from '@testing-library/react';
@@ -46,9 +46,9 @@ render(<Component />);
4646

4747
### ReactDOMTestUtils.Simulate {/*reactdomtestutilssimulate*/}
4848

49-
`Simulate` can be replaced with `fireEvent` from `@testing-library/react`.
49+
`Simulate` можно заменить на `fireEvent` из `@testing-library/react`.
5050

51-
Before:
51+
До:
5252

5353
```js
5454
import {Simulate} from 'react-dom/test-utils';
@@ -57,7 +57,7 @@ const element = document.querySelector('button');
5757
Simulate.click(element);
5858
```
5959

60-
After:
60+
После:
6161

6262
```js
6363
import {fireEvent} from '@testing-library/react';
@@ -66,9 +66,9 @@ const element = document.querySelector('button');
6666
fireEvent.click(element);
6767
```
6868

69-
Be aware that `fireEvent` dispatches an actual event on the element and doesn't just synthetically call the event handler.
69+
Имейте в виду, что `fireEvent` вызывает реальное событие на элементе, а не просто синтетически вызывает обработчик события.
7070

71-
### List of all removed APIs {/*list-of-all-removed-apis-list-of-all-removed-apis*/}
71+
### Список всех удаленных API {/*list-of-all-removed-apis-list-of-all-removed-apis*/}
7272

7373
- `mockComponent()`
7474
- `isElement()`
@@ -84,4 +84,4 @@ Be aware that `fireEvent` dispatches an actual event on the element and doesn't
8484
- `scryRenderedComponentsWithType()`
8585
- `findRenderedComponentWithType()`
8686
- `renderIntoDocument`
87-
- `Simulate`
87+
- `Simulate`

0 commit comments

Comments
 (0)