Skip to content

Commit

Permalink
chore: tweak v13 docs (#1694)
Browse files Browse the repository at this point in the history
* chore: move to v13-alpha

* chore: tweaks
  • Loading branch information
mdjastrzebski authored Oct 25, 2024
1 parent 94f5b39 commit 0632000
Show file tree
Hide file tree
Showing 47 changed files with 6 additions and 21 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# User Event interactions

:::info RNTL minimal version

User Event interactions require RNTL v12.2.0 or later.

:::

## Comparison with Fire Event API

Fire Event is our original event simulation API. It can invoke **any event handler** declared on **either host or composite elements**. Suppose the element does not have `onEventName` event handler for the passed `eventName` event, or the element is disabled. In that case, Fire Event will traverse up the component tree, looking for an event handler on both host and composite elements along the way. By default, it will **not pass any event data**, but the user might provide it in the last argument.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# Jest matchers

:::info RNTL minimal version

Built-in Jest matchers require RNTL v12.4.0 or later.

:::

This guide describes built-in Jest matchers, we recommend using these matchers as they provide readable tests, accessibility support, and a better developer experience.

## Setup
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ Default [debug options](#debug) to be used when calling `debug()`. These default

### `concurrentRoot` option

Set to `true` to enable concurrent rendering used in the React Native New Architecture. Otherwise `render` will default to legacy synchronous rendering.
Set to `false` to disable concurrent rendering.
Otherwise, `render` will default to using concurrent rendering used in the React Native New Architecture.

## `resetToDefaults()`

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ This option allows you to wrap the tested component, passed as the first option

#### `concurrentRoot` option

Set to `true` to enable concurrent rendering used in the React Native New Architecture. Otherwise `render` will default to legacy synchronous rendering.
Set to `false` to disable concurrent rendering.
Otherwise, `render` will default to using concurrent rendering used in the React Native New Architecture.

#### `createNodeMock` option

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ All of the built-in Jest matchers provided by the React Native Testing Library s

## Usage

You can use the built-in matchers by adding the following line to your `jest-setup.ts` file (configured using [`setupFilesAfterEnv`](https://jestjs.io/docs/configuration#setupfilesafterenv-array)):

```ts title=jest-setup.ts
import '@testing-library/react-native/extend-expect';
```
You don't need to do anything to use the built-in matchers. They are automatically available when you import anything from `@testing-library/react-native`.

### Gradual migration

Expand All @@ -23,7 +19,6 @@ You can use the built-in matchers alongside legacy Jest Native matchers by chang
// import '@testing-library/jest-native/extend-expect';

// With this:
import '@testing-library/react-native/extend-expect';
import '@testing-library/jest-native/legacy-extend-expect';
```

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion website/rspress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default defineConfig({
},
multiVersion: {
default: '12.x',
versions: ['12.x', '13.x'],
versions: ['12.x', '13.x-alpha'],
},
route: {
cleanUrls: true,
Expand Down

0 comments on commit 0632000

Please sign in to comment.