update docs base URL

This commit is contained in:
Maciej Jastrzebski
2026-01-20 22:44:09 +01:00
parent ac25e60883
commit 2e338c9fa0
7 changed files with 57 additions and 56 deletions
+17 -17
View File
@@ -81,33 +81,33 @@ You can find the source of `QuestionsBoard` component and this example [here](ht
React Native Testing Library consists of following APIs:
- [`render` function](https://callstack.github.io/react-native-testing-library/docs/api/render) - render your UI components for testing purposes
- [`screen` object](https://callstack.github.io/react-native-testing-library/docs/api/screen) - access rendered UI:
- [Queries](https://callstack.github.io/react-native-testing-library/docs/api/queries) - find rendered components by various predicates: role, text, test ids, etc
- Lifecycle methods: [`rerender`](https://callstack.github.io/react-native-testing-library/docs/api/screen#rerender), [`unmount`](https://callstack.github.io/react-native-testing-library/docs/api/screen#unmount)
- Helpers: [`debug`](https://callstack.github.io/react-native-testing-library/docs/api/screen#debug), [`toJSON`](https://callstack.github.io/react-native-testing-library/docs/api/screen#tojson), [`root`](https://callstack.github.io/react-native-testing-library/docs/api/screen#root)
- [Jest matchers](https://callstack.github.io/react-native-testing-library/docs/api/jest-matchers) - validate assumptions about your UI
- [User Event](https://callstack.github.io/react-native-testing-library/docs/api/events/user-event) - simulate common user interactions like [`press`](https://callstack.github.io/react-native-testing-library/docs/api/events/user-event#press) or [`type`](https://callstack.github.io/react-native-testing-library/docs/api/events/user-event#type)
- [Fire Event](https://callstack.github.io/react-native-testing-library/docs/api/events/fire-event) - simulate any component event
- [`renderHook` function](https://callstack.github.io/react-native-testing-library/docs/api/misc/render-hook) - render hooks for testing purposes
- [`render` function](https://oss.callstack.com/react-native-testing-library/docs/api/render) - render your UI components for testing purposes
- [`screen` object](https://oss.callstack.com/react-native-testing-library/docs/api/screen) - access rendered UI:
- [Queries](https://oss.callstack.com/react-native-testing-library/docs/api/queries) - find rendered components by various predicates: role, text, test ids, etc
- Lifecycle methods: [`rerender`](https://oss.callstack.com/react-native-testing-library/docs/api/screen#rerender), [`unmount`](https://oss.callstack.com/react-native-testing-library/docs/api/screen#unmount)
- Helpers: [`debug`](https://oss.callstack.com/react-native-testing-library/docs/api/screen#debug), [`toJSON`](https://oss.callstack.com/react-native-testing-library/docs/api/screen#tojson), [`root`](https://oss.callstack.com/react-native-testing-library/docs/api/screen#root)
- [Jest matchers](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers) - validate assumptions about your UI
- [User Event](https://oss.callstack.com/react-native-testing-library/docs/api/events/user-event) - simulate common user interactions like [`press`](https://oss.callstack.com/react-native-testing-library/docs/api/events/user-event#press) or [`type`](https://oss.callstack.com/react-native-testing-library/docs/api/events/user-event#type)
- [Fire Event](https://oss.callstack.com/react-native-testing-library/docs/api/events/fire-event) - simulate any component event
- [`renderHook` function](https://oss.callstack.com/react-native-testing-library/docs/api/misc/render-hook) - render hooks for testing purposes
- Miscellaneous APIs:
- [Async utils](https://callstack.github.io/react-native-testing-library/docs/api/misc/async): `findBy*` queries, `waitFor`, `waitForElementToBeRemoved`
- [Configuration](https://callstack.github.io/react-native-testing-library/docs/api/misc/config): `configure`, `resetToDefaults`
- [Accessibility](https://callstack.github.io/react-native-testing-library/docs/api/misc/accessibility): `isHiddenFromAccessibility`
- [Other](https://callstack.github.io/react-native-testing-library/docs/api/misc/other): `within`, `act`, `cleanup`
- [Async utils](https://oss.callstack.com/react-native-testing-library/docs/api/misc/async): `findBy*` queries, `waitFor`, `waitForElementToBeRemoved`
- [Configuration](https://oss.callstack.com/react-native-testing-library/docs/api/misc/config): `configure`, `resetToDefaults`
- [Accessibility](https://oss.callstack.com/react-native-testing-library/docs/api/misc/accessibility): `isHiddenFromAccessibility`
- [Other](https://oss.callstack.com/react-native-testing-library/docs/api/misc/other): `within`, `act`, `cleanup`
## Migration Guides
- [Migration to 13.0](https://callstack.github.io/react-native-testing-library/docs/migration/v13)
- [Migration to built-in Jest Matchers](https://callstack.github.io/react-native-testing-library/docs/migration/jest-matchers)
- [Migration to 13.0](https://oss.callstack.com/react-native-testing-library/docs/migration/v13)
- [Migration to built-in Jest Matchers](https://oss.callstack.com/react-native-testing-library/docs/migration/jest-matchers)
## Troubleshooting
- [Troubleshooting guide](https://callstack.github.io/react-native-testing-library/docs/guides/troubleshooting)
- [Troubleshooting guide](https://oss.callstack.com/react-native-testing-library/docs/guides/troubleshooting)
## Community Resources
Check out our list of [Community Resources about RNTL](https://callstack.github.io/react-native-testing-library/docs/guides/community-resources).
Check out our list of [Community Resources about RNTL](https://oss.callstack.com/react-native-testing-library/docs/guides/community-resources).
## Made with ❤️ at Callstack
+16 -16
View File
@@ -82,32 +82,32 @@ You can find the source of `QuestionsBoard` component and this example [here](ht
React Native Testing Library consists of following APIs:
- [`render` function](https://callstack.github.io/react-native-testing-library/docs/api/render) - render your UI components for testing purposes
- [`screen` object](https://callstack.github.io/react-native-testing-library/docs/api/screen) - access rendered UI:
- [Queries](https://callstack.github.io/react-native-testing-library/docs/api/queries) - find rendered components by various predicates: role, text, test ids, etc
- Lifecycle methods: [`rerender`](https://callstack.github.io/react-native-testing-library/docs/api/screen#rerender), [`unmount`](https://callstack.github.io/react-native-testing-library/docs/api/screen#unmount)
- Helpers: [`debug`](https://callstack.github.io/react-native-testing-library/docs/api/screen#debug), [`toJSON`](https://callstack.github.io/react-native-testing-library/docs/api/screen#tojson), [`root`](https://callstack.github.io/react-native-testing-library/docs/api/screen#root), [`container`](https://callstack.github.io/react-native-testing-library/docs/api/screen#container)
- [Jest matchers](https://callstack.github.io/react-native-testing-library/docs/api/jest-matchers) - validate assumptions about your UI
- [User Event](https://callstack.github.io/react-native-testing-library/docs/api/events/user-event) - simulate common user interactions like [`press`](https://callstack.github.io/react-native-testing-library/docs/api/events/user-event#press) or [`type`](https://callstack.github.io/react-native-testing-library/docs/api/events/user-event#type)
- [Fire Event](https://callstack.github.io/react-native-testing-library/docs/api/events/fire-event) - simulate any component event
- [`renderHook` function](https://callstack.github.io/react-native-testing-library/docs/api/misc/render-hook) - render hooks for testing purposes
- [`render` function](https://oss.callstack.com/react-native-testing-library/docs/api/render) - render your UI components for testing purposes
- [`screen` object](https://oss.callstack.com/react-native-testing-library/docs/api/screen) - access rendered UI:
- [Queries](https://oss.callstack.com/react-native-testing-library/docs/api/queries) - find rendered components by various predicates: role, text, test ids, etc
- Lifecycle methods: [`rerender`](https://oss.callstack.com/react-native-testing-library/docs/api/screen#rerender), [`unmount`](https://oss.callstack.com/react-native-testing-library/docs/api/screen#unmount)
- Helpers: [`debug`](https://oss.callstack.com/react-native-testing-library/docs/api/screen#debug), [`toJSON`](https://oss.callstack.com/react-native-testing-library/docs/api/screen#tojson), [`root`](https://oss.callstack.com/react-native-testing-library/docs/api/screen#root), [`container`](https://oss.callstack.com/react-native-testing-library/docs/api/screen#container)
- [Jest matchers](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers) - validate assumptions about your UI
- [User Event](https://oss.callstack.com/react-native-testing-library/docs/api/events/user-event) - simulate common user interactions like [`press`](https://oss.callstack.com/react-native-testing-library/docs/api/events/user-event#press) or [`type`](https://oss.callstack.com/react-native-testing-library/docs/api/events/user-event#type)
- [Fire Event](https://oss.callstack.com/react-native-testing-library/docs/api/events/fire-event) - simulate any component event
- [`renderHook` function](https://oss.callstack.com/react-native-testing-library/docs/api/misc/render-hook) - render hooks for testing purposes
- Miscellaneous APIs:
- [Async utils](https://callstack.github.io/react-native-testing-library/docs/api/misc/async): `findBy*` queries, `waitFor`, `waitForElementToBeRemoved`
- [Configuration](https://callstack.github.io/react-native-testing-library/docs/api/misc/config): `configure`, `resetToDefaults`
- [Accessibility](https://callstack.github.io/react-native-testing-library/docs/api/misc/accessibility): `isHiddenFromAccessibility`
- [Other](https://callstack.github.io/react-native-testing-library/docs/api/misc/other): `within`, `act`, `cleanup`
- [Async utils](https://oss.callstack.com/react-native-testing-library/docs/api/misc/async): `findBy*` queries, `waitFor`, `waitForElementToBeRemoved`
- [Configuration](https://oss.callstack.com/react-native-testing-library/docs/api/misc/config): `configure`, `resetToDefaults`
- [Accessibility](https://oss.callstack.com/react-native-testing-library/docs/api/misc/accessibility): `isHiddenFromAccessibility`
- [Other](https://oss.callstack.com/react-native-testing-library/docs/api/misc/other): `within`, `act`, `cleanup`
## Migration Guides
- **[Migration to 14.0](https://callstack.github.io/react-native-testing-library/docs/migration/v14)** - Drops React 18, async APIs by default
- **[Migration to 14.0](https://oss.callstack.com/react-native-testing-library/docs/migration/v14)** - Drops React 18, async APIs by default
## Troubleshooting
- [Troubleshooting guide](https://callstack.github.io/react-native-testing-library/docs/guides/troubleshooting)
- [Troubleshooting guide](https://oss.callstack.com/react-native-testing-library/docs/guides/troubleshooting)
## Community Resources
Check out our list of [Community Resources about RNTL](https://callstack.github.io/react-native-testing-library/docs/guides/community-resources).
Check out our list of [Community Resources about RNTL](https://oss.callstack.com/react-native-testing-library/docs/guides/community-resources).
## Made with ❤️ at Callstack
+3 -2
View File
@@ -8,7 +8,7 @@
"type": "git",
"url": "https://www.github.com/callstack/react-native-testing-library.git"
},
"homepage": "https://callstack.github.io/react-native-testing-library",
"homepage": "https://oss.callstack.com/react-native-testing-library",
"author": "Michał Pierzchała <thymikee@gmail.com> (https://github.com/thymikee), Maciej Jastrzębski <mdjastrzebski@gmail.com> (https://github.com/mdjastrzebski)",
"contributors": [
"Augustin Le Fèvre <augustin.le-fevre@klarna.com> (https://github.com/AugustinLF)",
@@ -39,7 +39,8 @@
"build": "yarn clean && yarn build:js && yarn build:ts",
"release": "release-it",
"release:rc": "release-it --preRelease=rc",
"release:beta": "release-it --preRelease=beta"
"release:beta": "release-it --preRelease=beta",
"release:codemods": "release-it --preRelease=alpha"
},
"files": [
"build/",
+18 -18
View File
@@ -10,7 +10,7 @@ export interface JestNativeMatchers<R> {
* Assert whether a host element is present in the element tree (screen) or not.
*
* @see
* [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeonthescreen)
* [Jest Matchers docs](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers#tobeonthescreen)
*
* @example
* <Text>Hello</Text>
@@ -24,7 +24,7 @@ export interface JestNativeMatchers<R> {
* Assert whether a host element is checked based on accessibility props.
*
* @see
* [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobechecked)
* [Jest Matchers docs](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers#tobechecked)
*
* @see {@link toBePartiallyChecked} for a related matcher.
*
@@ -39,7 +39,7 @@ export interface JestNativeMatchers<R> {
* Assert whether a host element is collapsed based on accessibility props.
*
* @see
* [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeexpanded)
* [Jest Matchers docs](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers#tobeexpanded)
*
* @see {@link toBeExpanded} for an inverse matcher.
*
@@ -56,7 +56,7 @@ export interface JestNativeMatchers<R> {
* This matcher will check ancestor elements for their disabled state as well.
*
* @see
* [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeenabled)
* [Jest Matchers docs](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers#tobeenabled)
*
* @see {@link toBeEnabled} for an inverse matcher.
*
@@ -74,7 +74,7 @@ export interface JestNativeMatchers<R> {
* This matcher will check ancestor elements for their disabled state as well.
*
* @see
* [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobebusy)
* [Jest Matchers docs](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers#tobebusy)
*
* @example
* <View testID="loader" aria-busy />
@@ -87,7 +87,7 @@ export interface JestNativeMatchers<R> {
* Assert whether a host element has no host children or text content.
*
* @see
* [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeemptyelement)
* [Jest Matchers docs](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers#tobeemptyelement)
*
* @example
* <View testID="not-empty">
@@ -105,7 +105,7 @@ export interface JestNativeMatchers<R> {
* This matcher will check ancestor elements for their disabled state as well.
*
* @see
* [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeenabled)
* [Jest Matchers docs](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers#tobeenabled)
*
* @see {@link toBeDisabled} for inverse matcher.
*
@@ -120,7 +120,7 @@ export interface JestNativeMatchers<R> {
* Assert whether a host element is expanded based on accessibility props.
*
* @see
* [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeexpanded)
* [Jest Matchers docs](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers#tobeexpanded)
*
* @see {@link toBeCollapsed} for inverse matcher.
*
@@ -135,7 +135,7 @@ export interface JestNativeMatchers<R> {
* Assert whether a host element is partially checked based on accessibility props.
*
* @see
* [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobechecked)
* [Jest Matchers docs](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers#tobechecked)
*
* @see {@link toBeChecked} for related matcher.
*
@@ -150,7 +150,7 @@ export interface JestNativeMatchers<R> {
* Assert whether a host element is selected based on accessibility props.
*
* @see
* [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeselected)
* [Jest Matchers docs](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers#tobeselected)
*
* @example
* <View testID="view" aria-selected />
@@ -165,7 +165,7 @@ export interface JestNativeMatchers<R> {
* This matcher will check ancestor elements for their visibility as well.
*
* @see
* [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobevisible)
* [Jest Matchers docs](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers#tobevisible)
*
* @example
* <View testID="visible" />
@@ -180,7 +180,7 @@ export interface JestNativeMatchers<R> {
* Assert whether a host element contains another host element.
*
* @see
* [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tocontainelement)
* [Jest Matchers docs](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers#tocontainelement)
*
* @example
* <View testID="outer">
@@ -195,7 +195,7 @@ export interface JestNativeMatchers<R> {
* Assert whether a host element has a given accessbility value.
*
* @see
* [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tohaveaccessibilityvalue)
* [Jest Matchers docs](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers#tohaveaccessibilityvalue)
*
*
* @example
@@ -209,7 +209,7 @@ export interface JestNativeMatchers<R> {
* Assert whether a host element has a given accessibile name based on the accessibility label or text content.
*
* @see
* [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tohaveaccessiblename)
* [Jest Matchers docs](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers#tohaveaccessiblename)
*
* @example
* <View testID="view" aria-label="Hello" />
@@ -222,7 +222,7 @@ export interface JestNativeMatchers<R> {
* Assert whether a host `TextInput` element has a given display value based on `value` prop, unmanaged native state, and `defaultValue` prop.
*
* @see
* [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tohavedisplayvalue)
* [Jest Matchers docs](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers#tohavedisplayvalue)
*
* @example
* <TextInput testID="input" value="Hello" />
@@ -235,7 +235,7 @@ export interface JestNativeMatchers<R> {
* Assert whether a host element has a given prop.
*
* @see
* [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tohaveprop)
* [Jest Matchers docs](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers#tohaveprop)
*
* @example
* <Text testID="text" numberOfLines={1]} />
@@ -249,7 +249,7 @@ export interface JestNativeMatchers<R> {
* Assert whether a host element has a given style.
*
* @see
* [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tohavestyle)
* [Jest Matchers docs](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers#tohavestyle)
*
* @example
* <View testID="view" style={{ width: '100%' }} />
@@ -263,7 +263,7 @@ export interface JestNativeMatchers<R> {
* Assert whether a host element has a given text content.
*
* @see
* [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tohavetextcontent)
* [Jest Matchers docs](https://oss.callstack.com/react-native-testing-library/docs/api/jest-matchers#tohavetextcontent)
*
* @example
* <View testID="view">
+1 -1
View File
@@ -18,6 +18,6 @@ test('findByTestId detects screen being detached', async () => {
Screen is no longer attached. Check your test for "findBy*" or "waitFor" calls that have not been awaited.
We recommend enabling "eslint-plugin-testing-library" to catch these issues at build time:
https://callstack.github.io/react-native-testing-library/docs/start/quick-start#eslint-plugin"
https://oss.callstack.com/react-native-testing-library/docs/start/quick-start#eslint-plugin"
`);
});
+1 -1
View File
@@ -88,7 +88,7 @@ function formatErrorMessage(message: string, printElementTree: boolean) {
}
if (screen.isDetached) {
return `${message}\n\nScreen is no longer attached. Check your test for "findBy*" or "waitFor" calls that have not been awaited.\n\nWe recommend enabling "eslint-plugin-testing-library" to catch these issues at build time:\nhttps://callstack.github.io/react-native-testing-library/docs/start/quick-start#eslint-plugin`;
return `${message}\n\nScreen is no longer attached. Check your test for "findBy*" or "waitFor" calls that have not been awaited.\n\nWe recommend enabling "eslint-plugin-testing-library" to catch these issues at build time:\nhttps://oss.callstack.com/react-native-testing-library/docs/start/quick-start#eslint-plugin`;
}
const json = screen.toJSON();
+1 -1
View File
@@ -417,7 +417,7 @@ export default defineConfig({
pluginOpenGraph({
title: 'React Native Testing Library',
type: 'website',
url: 'https://callstack.github.io/react-native-testing-library/',
url: 'https://oss.callstack.com/react-native-testing-library/',
description: 'Helps you to write better tests with less effort.',
}),
],