From e8010b3e77dfd752ee5b916ec507c226ed98080d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 12:35:39 +0000 Subject: [PATCH] deploy: 7bc0d5dbe96656b84744583575febbd3e5ba31a5 --- 404.html | 2 +- cookbook/advanced/network-requests.html | 2 +- cookbook/basics/async-tests.html | 2 +- cookbook/basics/custom-render.html | 2 +- cookbook/index.html | 2 +- cookbook/state-management/jotai.html | 2 +- docs/advanced/testing-env.html | 2 +- docs/advanced/understanding-act.html | 2 +- docs/api.html | 2 +- docs/api/events/fire-event.html | 2 +- docs/api/events/user-event.html | 2 +- docs/api/jest-matchers.html | 2 +- docs/api/misc/accessibility.html | 2 +- docs/api/misc/async.html | 2 +- docs/api/misc/config.html | 2 +- docs/api/misc/other.html | 2 +- docs/api/misc/render-hook.html | 2 +- docs/api/queries.html | 4 ++-- docs/api/render.html | 2 +- docs/api/screen.html | 2 +- docs/guides/community-resources.html | 2 +- docs/guides/faq.html | 2 +- docs/guides/how-to-query.html | 2 +- docs/guides/troubleshooting.html | 2 +- docs/migration/jest-matchers.html | 2 +- docs/migration/previous/v11.html | 2 +- docs/migration/previous/v2.html | 2 +- docs/migration/previous/v7.html | 2 +- docs/migration/previous/v9.html | 2 +- docs/migration/v12.html | 2 +- docs/start/intro.html | 2 +- docs/start/quick-start.html | 2 +- index.html | 2 +- static/js/{539.060c9ab6.js => 539.b030ae28.js} | 4 ++-- ...39.060c9ab6.js.LICENSE.txt => 539.b030ae28.js.LICENSE.txt} | 0 static/js/async/119.4f60f763.js | 1 + static/js/async/119.ae252a60.js | 1 - static/js/{index.dd7667e1.js => index.9a8995b9.js} | 2 +- ...dex.12_x.05c196e5.json => search_index.12_x.cefcd521.json} | 2 +- 39 files changed, 39 insertions(+), 39 deletions(-) rename static/js/{539.060c9ab6.js => 539.b030ae28.js} (99%) rename static/js/{539.060c9ab6.js.LICENSE.txt => 539.b030ae28.js.LICENSE.txt} (100%) create mode 100644 static/js/async/119.4f60f763.js delete mode 100644 static/js/async/119.ae252a60.js rename static/js/{index.dd7667e1.js => index.9a8995b9.js} (99%) rename static/{search_index.12_x.05c196e5.json => search_index.12_x.cefcd521.json} (50%) diff --git a/404.html b/404.html index c6b1529d6..34a645e32 100644 --- a/404.html +++ b/404.html @@ -1 +1 @@ -
Mocking network requests is an essential part of testing React Native applications. By mocking network diff --git a/cookbook/basics/async-tests.html b/cookbook/basics/async-tests.html index ad8799d4a..5a6def245 100644 --- a/cookbook/basics/async-tests.html +++ b/cookbook/basics/async-tests.html @@ -1,4 +1,4 @@ -
Typically, you would write synchronous tests, as they are simple and get the work done. However, there are cases when using asynchronous (async) tests might be necessary or beneficial. The two most common cases are:
render
functionrender
functionRNTL exposes the render
function as the primary entry point for tests. If you make complex, repeating setups for your tests, consider creating a custom render function. The idea is to encapsulate common setup steps and test wiring inside a render function suitable for your tests.
Welcome to the React Native Testing Library (RNTL) Cookbook! This app is your go-to resource for learning how to effectively test React Native applications. It provides a collection of best practices, ready-made recipes, and tips & tricks to diff --git a/cookbook/state-management/jotai.html b/cookbook/state-management/jotai.html index b764fa057..1635b393d 100644 --- a/cookbook/state-management/jotai.html +++ b/cookbook/state-management/jotai.html @@ -1,4 +1,4 @@ -
Jotai is a global state management library for React that uses an atomic approach to optimize renders and solve issues like extra re-renders and the need for memoization. It scales from simple diff --git a/docs/advanced/testing-env.html b/docs/advanced/testing-env.html index 0465f1910..5ad4647af 100644 --- a/docs/advanced/testing-env.html +++ b/docs/advanced/testing-env.html @@ -1,4 +1,4 @@ -
This document is intended for a more advanced audience who want to understand the internals of our testing environment better, e.g., to contribute to the codebase. You should be able to write integration or component tests without reading this.
act
functionact
functionWhen writing RNTL tests one of the things that confuses developers the most are cryptic act()
function errors logged into console. In this article I will try to build an understanding of the purpose and behaviour of act()
so you can build your tests with more confidence.
act
warningsLet’s start with typical act()
warnings logged to console. There are two kinds of these issues, let’s call the first one the "sync act()
" warning:
React Native Testing Library consists of following APIs:
render
function - render your UI components for testing purposesFor common events like press
or type
it's recommended to use User Event API as it offers
more realistic event simulation by emitting a sequence of events with proper event objects that mimic React Native runtime behavior.
User Event interactions require RNTL v12.2.0 or later.
Built-in Jest matchers require RNTL v12.4.0 or later.
isHiddenFromAccessibility
Also available as isInaccessible()
alias for React Testing Library compatibility.
findBy*
queriesThe findBy*
queries are used to find elements that are not instantly available but will be added as a result of some asynchronous action. Learn more details here.
waitFor
configure