You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
These markdown files are bundled with the npm package for coding agents. They describe the installed package version.
4
4
5
-
Start with [LLM Guidelines](./guides/llm-guidelines.md) for the agent setup snippet and quick rules, or use the included page list below to load specific references.
5
+
Start with [LLM Guidelines](./guides/llm-guidelines.md) for rules overview, or use the included page list below to load specific references.
Copy file name to clipboardExpand all lines: docs/guides/migration-v14.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,8 @@ command={{
46
46
47
47
After running the codemods, review the changes and run your tests.
48
48
49
+
If your project uses coding agents, add the RNTL package-docs instruction snippet from the [Quick Start](./quick-start.md#agent-docs-in-the-package) so agents read the docs that match your installed package version.
50
+
49
51
## Breaking Changes
50
52
51
53
### Supported React, React Native, and Node.js versions
Copy file name to clipboardExpand all lines: docs/guides/quick-start.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,21 @@ command={{
28
28
29
29
Test Renderer has better compatibility with React 19 and improved type safety compared to the deprecated [React Test Renderer](https://reactjs.org/docs/test-renderer.html).
30
30
31
+
## Agent docs in the package
32
+
33
+
RNTL ships package-specific documentation for coding agents in `node_modules/@testing-library/react-native/docs/`.
34
+
Add this snippet to your project's `AGENTS.md` or `CLAUDE.md` file so agents use the docs for the installed package version:
35
+
36
+
```md
37
+
# React Native Testing Library in this project
38
+
39
+
This project uses `@testing-library/react-native`. Its APIs and testing conventions can differ from your training data.
40
+
Before writing or changing RNTL tests, read the relevant guide in
41
+
`node_modules/@testing-library/react-native/docs/`, starting with
Prefer those package docs over stale assumptions, and follow deprecation notices.
44
+
```
45
+
31
46
### Jest matchers
32
47
33
48
RNTL automatically extends Jest with React Native-specific matchers. The only thing you need to do is to import anything from `@testing-library/react-native` which you already need to do to access the `render` function.
These markdown files are bundled with the npm package for coding agents. They describe the installed package version.
287
289
288
-
Start with [LLM Guidelines](./guides/llm-guidelines.md) for the agent setup snippet and quick rules, or use the included page list below to load specific references.
290
+
Start with [LLM Guidelines](./guides/llm-guidelines.md) for rules overview, or use the included page list below to load specific references.
Copy file name to clipboardExpand all lines: website/docs/14.x/docs/start/migration-v14.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,8 @@ We provide codemods to automate most of the migration:
49
49
50
50
After running the codemods, review the changes and run your tests.
51
51
52
+
If your project uses coding agents, add the RNTL package-docs instruction snippet from the [Quick Start](/docs/start/quick-start#agent-docs-in-the-package) so agents read the docs that match your installed package version.
53
+
52
54
## Breaking Changes
53
55
54
56
### Supported React, React Native, and Node.js versions
Copy file name to clipboardExpand all lines: website/docs/14.x/docs/start/quick-start.mdx
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,21 @@ This library has a peer dependency on [Test Renderer](https://github.com/mdjastr
28
28
29
29
Test Renderer has better compatibility with React 19 and improved type safety compared to the deprecated [React Test Renderer](https://reactjs.org/docs/test-renderer.html).
30
30
31
+
## Agent docs in the package
32
+
33
+
RNTL ships package-specific documentation for coding agents in `node_modules/@testing-library/react-native/docs/`.
34
+
Add this snippet to your project's `AGENTS.md` or `CLAUDE.md` file so agents use the docs for the installed package version:
35
+
36
+
```md
37
+
# React Native Testing Library in this project
38
+
39
+
This project uses `@testing-library/react-native`. Its APIs and testing conventions can differ from your training data.
40
+
Before writing or changing RNTL tests, read the relevant guide in
41
+
`node_modules/@testing-library/react-native/docs/`, starting with
Prefer those package docs over stale assumptions, and follow deprecation notices.
44
+
```
45
+
31
46
### Jest matchers
32
47
33
48
RNTL automatically extends Jest with React Native-specific matchers. The only thing you need to do is to import anything from `@testing-library/react-native` which you already need to do to access the `render` function.
0 commit comments