Skip to content

Commit e7cd5e6

Browse files
committed
docs
1 parent eb2709a commit e7cd5e6

File tree

8 files changed

+21
-21
lines changed

8 files changed

+21
-21
lines changed

website/docs/14.x/docs/advanced/testing-env.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ React allows you to write declarative code using JSX, write function or class co
1818

1919
When you run your tests in the React Native Testing Library, somewhat contrary to what the name suggests, they are actually **not** using React Native renderer. This is because this renderer needs to be run on an iOS or Android operating system, so it would need to run on a device or simulator.
2020

21-
## Universal Test Renderer
21+
## Test Renderer
2222

23-
Instead, RNTL uses [Universal Test Renderer](https://github.com/mdjastrzebski/test-renderer), a modern, actively maintained renderer that allows rendering to pure JavaScript objects without access to mobile OS and can run in a Node.js environment using Jest (or any other JavaScript test runner). Universal Test Renderer replaces the deprecated `react-test-renderer` package and provides better compatibility with React 19 and improved type safety.
23+
Instead, RNTL uses [Test Renderer](https://github.com/mdjastrzebski/test-renderer), a modern, actively maintained renderer that allows rendering to pure JavaScript objects without access to mobile OS and can run in a Node.js environment using Jest (or any other JavaScript test runner). Test Renderer replaces the deprecated `react-test-renderer` package and provides better compatibility with React 19 and improved type safety.
2424

25-
Using Universal Test Renderer has pros and cons.
25+
Using Test Renderer has pros and cons.
2626

2727
Benefits:
2828

@@ -41,9 +41,9 @@ It's worth noting that the React Testing Library (web one) works a bit different
4141

4242
## Element tree
4343

44-
Calling the `render()` function creates an element tree. This is done internally by invoking the renderer's `create()` method from Universal Test Renderer. The output tree represents your React Native component tree, and each node of that tree is an "instance" of some React component (to be more precise, each node represents a React fiber, and only class components have instances, while function components store the hook state using fibers).
44+
Calling the `render()` function creates an element tree. This is done internally by invoking the renderer's `create()` method from Test Renderer. The output tree represents your React Native component tree, and each node of that tree is an "instance" of some React component (to be more precise, each node represents a React fiber, and only class components have instances, while function components store the hook state using fibers).
4545

46-
These tree elements are represented by `HostElement` type from Universal Test Renderer:
46+
These tree elements are represented by `HostElement` type from Test Renderer:
4747

4848
```tsx
4949
interface HostElement {
@@ -56,7 +56,7 @@ interface HostElement {
5656
}
5757
```
5858

59-
For more details, see the [Universal Test Renderer documentation](https://github.com/mdjastrzebski/test-renderer).
59+
For more details, see the [Test Renderer documentation](https://github.com/mdjastrzebski/test-renderer).
6060

6161
## Host and composite components
6262

website/docs/14.x/docs/api/render.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ Otherwise, `render` will default to using concurrent rendering used in the React
4545
createNodeMock?: (element: React.Element) => unknown,
4646
```
4747

48-
This option allows you to pass `createNodeMock` option to the renderer's `create()` method in order to allow for custom mock refs. This option is passed through to [Universal Test Renderer](https://github.com/mdjastrzebski/test-renderer).
48+
This option allows you to pass `createNodeMock` option to the renderer's `create()` method in order to allow for custom mock refs. This option is passed through to [Test Renderer](https://github.com/mdjastrzebski/test-renderer).
4949

5050
:::note Text string validation
5151

52-
Universal Test Renderer automatically enforces React Native's requirement that text strings must be rendered within a `<Text>` component. If you try to render a `string` value under components other than `<Text>` (e.g., under `<View>`), it will throw an `Invariant Violation: Text strings must be rendered within a <Text> component` error, matching React Native's runtime behavior.
52+
Test Renderer automatically enforces React Native's requirement that text strings must be rendered within a `<Text>` component. If you try to render a `string` value under components other than `<Text>` (e.g., under `<View>`), it will throw an `Invariant Violation: Text strings must be rendered within a <Text> component` error, matching React Native's runtime behavior.
5353

5454
This validation is always enabled and cannot be disabled, ensuring your tests accurately reflect how your code will behave in production.
5555

website/docs/14.x/docs/api/screen.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Get the rendered component JSON representation, e.g. for snapshot testing.
148148
const container: HostElement;
149149
```
150150

151-
Returns a pseudo-element container whose children are the elements you asked to render. This is the root container element from [Universal Test Renderer](https://github.com/mdjastrzebski/test-renderer).
151+
Returns a pseudo-element container whose children are the elements you asked to render. This is the root container element from [Test Renderer](https://github.com/mdjastrzebski/test-renderer).
152152

153153
The `container` is safe to use and provides access to the entire rendered tree. It's useful when you need to query or manipulate the entire rendered output, similar to how `container` works in [React Testing Library](https://testing-library.com/docs/react-testing-library/other#container-1).
154154

website/docs/14.x/docs/guides/faq.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ React Native Testing Library does not provide an entire React Native runtime sin
88
or iOS simulator/Android emulator to provision the underlying OS and platform APIs.
99

1010
Instead of using React Native renderer, it simulates only the JavaScript part of its runtime
11-
using [Universal Test Renderer](https://github.com/mdjastrzebski/test-renderer) while providing queries
11+
using [Test Renderer](https://github.com/mdjastrzebski/test-renderer) while providing queries
1212
and event APIs ([User Event](docs/api/events/user-event), [Fire Event](docs/api/events/fire-event)) that mimicking certain behaviors from the actual runtime.
1313

1414
You can learn more about our testing environment [here](docs/advanced/testing-env).

website/docs/14.x/docs/guides/troubleshooting.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
This guide describes common issues found by users when integrating React Native Test Library to their projects:
44

5-
## Matching React Native, React & Universal Test Renderer versions
5+
## Matching React Native, React & Test Renderer versions
66

77
Check that you have matching versions of core dependencies:
88

99
- React Native
1010
- React
11-
- Universal Test Renderer (automatically installed with RNTL)
11+
- Test Renderer (automatically installed with RNTL)
1212

1313
React Native uses different versioning scheme from React, you can use [React Native Upgrade Helper](https://react-native-community.github.io/upgrade-helper/) to find the correct matching between React Native & React versions. In case you use Expo, run `npx expo install --fix` in your project to validate and install compatible versions of these dependencies.
1414

15-
Universal Test Renderer is automatically managed as a dependency of React Native Testing Library and is compatible with React 18 and React 19.
15+
Test Renderer is automatically managed as a dependency of React Native Testing Library and is compatible with React 18 and React 19.
1616

1717
Related issues: [#1061](https://github.com/callstack/react-native-testing-library/issues/1061), [#938](https://github.com/callstack/react-native-testing-library/issues/938), [#920](https://github.com/callstack/react-native-testing-library/issues/920)
1818

website/docs/14.x/docs/migration/v14.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ This guide describes the migration to React Native Testing Library version 14 fr
44

55
## Breaking changes
66

7-
### Universal Test Renderer replaces React Test Renderer
7+
### Test Renderer replaces React Test Renderer
88

9-
In v14, React Native Testing Library now uses [Universal Test Renderer](https://github.com/mdjastrzebski/test-renderer) instead of the deprecated `react-test-renderer` package. Universal Test Renderer is a modern, actively maintained alternative that provides better compatibility with React 19 and improved type safety.
9+
In v14, React Native Testing Library now uses [Test Renderer](https://github.com/mdjastrzebski/test-renderer) instead of the deprecated `react-test-renderer` package. Test Renderer is a modern, actively maintained alternative that provides better compatibility with React 19 and improved type safety.
1010

1111
**What changed:**
1212

1313
- The underlying rendering engine has been switched from `react-test-renderer` to `test-renderer`
1414
- This change is mostly internal and should not require code changes in most cases
15-
- Type definitions have been updated to use `HostElement` from Universal Test Renderer instead of `ReactTestInstance`
15+
- Type definitions have been updated to use `HostElement` from Test Renderer instead of `ReactTestInstance`
1616

1717
**Migration:**
1818

@@ -48,7 +48,7 @@ import type { HostElement } from 'test-renderer';
4848

4949
**Note:** Most users won't need to update type imports, as React Native Testing Library now exports the necessary types directly.
5050

51-
For more details, see the [Universal Test Renderer documentation](https://github.com/mdjastrzebski/test-renderer).
51+
For more details, see the [Test Renderer documentation](https://github.com/mdjastrzebski/test-renderer).
5252

5353
### `container` API reintroduced
5454

@@ -57,7 +57,7 @@ In v14, the `container` API has been reintroduced and is now safe to use. Previo
5757
**What changed:**
5858

5959
- `screen.container` is now available and safe to use
60-
- `container` returns a pseudo-element container from Universal Test Renderer
60+
- `container` returns a pseudo-element container from Test Renderer
6161
- The container's children are the elements you rendered
6262
- `UNSAFE_root` has been removed
6363

@@ -499,7 +499,7 @@ it('should press button', () => {
499499
500500
### Text string validation now enforced by default
501501
502-
In v14, Universal Test Renderer automatically enforces React Native's requirement that text strings must be rendered within a `<Text>` component. This means the `unstable_validateStringsRenderedWithinText` option has been removed from `RenderOptions`, as this validation is now always enabled.
502+
In v14, Test Renderer automatically enforces React Native's requirement that text strings must be rendered within a `<Text>` component. This means the `unstable_validateStringsRenderedWithinText` option has been removed from `RenderOptions`, as this validation is now always enabled.
503503
504504
**What changed:**
505505

website/docs/14.x/docs/start/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ You want to write maintainable tests for your React Native components. As a part
66

77
## This solution
88

9-
The React Native Testing Library (RNTL) is a lightweight solution for testing React Native components. It provides light utility functions on top of [Universal Test Renderer](https://github.com/mdjastrzebski/test-renderer), in a way that encourages better testing practices. Its primary guiding principle is:
9+
The React Native Testing Library (RNTL) is a lightweight solution for testing React Native components. It provides light utility functions on top of [Test Renderer](https://github.com/mdjastrzebski/test-renderer), in a way that encourages better testing practices. Its primary guiding principle is:
1010

1111
> The more your tests resemble how your software is used, the more confidence they can give you.
1212

website/docs/14.x/docs/start/quick-start.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Open a Terminal in your project's folder and run:
1313
}}
1414
/>
1515

16-
This library uses [Universal Test Renderer](https://github.com/mdjastrzebski/test-renderer) as its underlying rendering engine. Universal Test Renderer is automatically installed as a dependency and provides better compatibility with React 19 and improved type safety compared to the deprecated `react-test-renderer` package.
16+
This library uses [Test Renderer](https://github.com/mdjastrzebski/test-renderer) as its underlying rendering engine. Test Renderer is automatically installed as a dependency and provides better compatibility with React 19 and improved type safety compared to the deprecated `react-test-renderer` package.
1717

1818
### Jest matchers
1919

0 commit comments

Comments
 (0)