This commit is contained in:
github-actions[bot]
2024-03-12 10:37:37 +00:00
parent 17e63c540b
commit 14ca0cd079
35 changed files with 48 additions and 48 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">Page Not Found | React Native Testing Library</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" name="twitter:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" property="og:url" content="https://callstack.github.io/react-native-testing-library/404.html"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="og:title" content="Page Not Found | React Native Testing Library"><link data-rh="true" rel="icon" href="/react-native-testing-library/img/owl.png"><link data-rh="true" rel="canonical" href="https://callstack.github.io/react-native-testing-library/404.html"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/404.html" hreflang="en"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/404.html" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://6CJ0BV6AVN-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="React Native Testing Library" href="/react-native-testing-library/opensearch.xml"><link rel="stylesheet" href="/react-native-testing-library/assets/css/styles.afd276ca.css">
<script src="/react-native-testing-library/assets/js/runtime~main.e24eefd6.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/runtime~main.33c6f488.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/main.3e94263e.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
"use strict";(self.webpackChunkreact_native_testing_library_website=self.webpackChunkreact_native_testing_library_website||[]).push([[884],{6062:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>m,frontMatter:()=>r,metadata:()=>o,toc:()=>l});var i=n(5893),s=n(1151);const r={id:"community-resources",title:"Community Resources"},a=void 0,o={id:"community-resources",title:"Community Resources",description:"Recommended content",source:"@site/docs/CommunityResources.md",sourceDirName:".",slug:"/community-resources",permalink:"/react-native-testing-library/docs/community-resources",draft:!1,unlisted:!1,editUrl:"https://github.com/callstack/react-native-testing-library/blob/main/website/docs/CommunityResources.md",tags:[],version:"current",frontMatter:{id:"community-resources",title:"Community Resources"},sidebar:"docs",previous:{title:"Understanding Act function",permalink:"/react-native-testing-library/docs/understanding-act"},next:{title:"Migration from Jest Native matchers",permalink:"/react-native-testing-library/docs/migration-jest-native"}},c={},l=[{value:"Recommended content",id:"recommended-content",level:3},{value:"Older, potentially outdated content",id:"older-potentially-outdated-content",level:3}];function d(e){const t={a:"a",h3:"h3",li:"li",ul:"ul",...(0,s.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h3,{id:"recommended-content",children:"Recommended content"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://kentcdodds.com/blog/the-testing-trophy-and-testing-classifications",children:"The Testing Trophy and Testing Classifications"})," by Kent C. Dodds (2021) - classic article explaining testing philosophy behind all Testing Library implementations."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://kentcdodds.com/blog/common-mistakes-with-react-testing-library",children:"Common mistakes with React Testing Library"})," by Kent C. Dodds (2020) - classic article explaining React Testing Library best practices, highly applicable to RNTL as well."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/anisurrahman072/React-Native-Advanced-Guide/blob/master/Testing/RNTL-Component-Testing-ultimate-guide.md",children:"React Native \u2014 UI Testing (Ultimate Guide)"})," by Anisur Rahman - comprehensive guide to RNTL testing"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/vanGalilea/react-native-testing",children:"React Native Testing examples repo"})," by Steve Galili - extensive repo with RN testing examples for RNTL and Maestro"]}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"older-potentially-outdated-content",children:"Older, potentially outdated content"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://blog.usejournal.com/where-and-how-to-start-testing-your-react-native-app-%EF%B8%8F-and-how-to-keep-on-testin-ec3464fb9b41",children:"Where and how to start testing \ud83e\uddea your react-native app \u269b\ufe0f and how to keep on testin\u2019"})," by Steve Galili (2020) - article referencing Steve's examples repo."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://youtu.be/CpTQb0XWlRc",children:"Intro to React Native Testing Library & Jest Native"})," by Alireza Ghamkhar (2020) - video tutorial on RNTL setup and testing."]}),"\n"]})]})}function m(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>o,a:()=>a});var i=n(7294);const s={},r=i.createContext(s);function a(e){const t=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(r.Provider,{value:t},e.children)}}}]);
+1
View File
@@ -0,0 +1 @@
"use strict";(self.webpackChunkreact_native_testing_library_website=self.webpackChunkreact_native_testing_library_website||[]).push([[884],{6062:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>m,frontMatter:()=>r,metadata:()=>o,toc:()=>l});var i=n(5893),s=n(1151);const r={id:"community-resources",title:"Community Resources"},a=void 0,o={id:"community-resources",title:"Community Resources",description:"Recommended content",source:"@site/docs/CommunityResources.md",sourceDirName:".",slug:"/community-resources",permalink:"/react-native-testing-library/docs/community-resources",draft:!1,unlisted:!1,editUrl:"https://github.com/callstack/react-native-testing-library/blob/main/website/docs/CommunityResources.md",tags:[],version:"current",frontMatter:{id:"community-resources",title:"Community Resources"},sidebar:"docs",previous:{title:"Understanding Act function",permalink:"/react-native-testing-library/docs/understanding-act"},next:{title:"Migration from Jest Native matchers",permalink:"/react-native-testing-library/docs/migration-jest-native"}},c={},l=[{value:"Recommended content",id:"recommended-content",level:3},{value:"Older, potentially outdated content",id:"older-potentially-outdated-content",level:3}];function d(e){const t={a:"a",h3:"h3",li:"li",ul:"ul",...(0,s.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h3,{id:"recommended-content",children:"Recommended content"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://kentcdodds.com/blog/the-testing-trophy-and-testing-classifications",children:"The Testing Trophy and Testing Classifications"})," by Kent C. Dodds (2021) - classic article explaining testing philosophy behind all Testing Library implementations."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://kentcdodds.com/blog/common-mistakes-with-react-testing-library",children:"Common mistakes with React Testing Library"})," by Kent C. Dodds (2020) - classic article explaining React Testing Library best practices, highly applicable to RNTL as well."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/anisurrahman072/React-Native-Advanced-Guide/blob/master/Testing/RNTL-Component-Testing-ultimate-guide.md",children:"React Native \u2014 UI Testing (Ultimate Guide)"})," by Anisur Rahman - comprehensive guide to RNTL testing"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/vanGalilea/react-native-testing",children:"React Native Testing examples repo"})," by Steve Galili - extensive repo with RN testing examples for RNTL and Maestro"]}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"older-potentially-outdated-content",children:"Older, potentially outdated content"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://blog.usejournal.com/where-and-how-to-start-testing-your-react-native-app-%EF%B8%8F-and-how-to-keep-on-testin-ec3464fb9b41",children:"Where and how to start testing \ud83e\uddea your react-native app \u269b\ufe0f and how to keep on testin\u2019"})," by Steve Galili (2020) - article referencing Steve's examples repo."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://youtu.be/CpTQb0XWlRc",children:"Intro to React Native Testing Library & Jest Native"})," by Alireza Ghamkhar (2020) - video tutorial on RNTL setup and testing."]}),"\n"]})]})}function m(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>o,a:()=>a});var i=n(7294);const s={},r=i.createContext(s);function a(e){const t=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(r.Provider,{value:t},e.children)}}}]);
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
(()=>{"use strict";var e,t,a,r,o,n={},b={};function d(e){var t=b[e];if(void 0!==t)return t.exports;var a=b[e]={id:e,loaded:!1,exports:{}};return n[e].call(a.exports,a,a.exports,d),a.loaded=!0,a.exports}d.m=n,d.c=b,e=[],d.O=(t,a,r,o)=>{if(!a){var n=1/0;for(i=0;i<e.length;i++){a=e[i][0],r=e[i][1],o=e[i][2];for(var b=!0,f=0;f<a.length;f++)(!1&o||n>=o)&&Object.keys(d.O).every((e=>d.O[e](a[f])))?a.splice(f--,1):(b=!1,o<n&&(n=o));if(b){e.splice(i--,1);var c=r();void 0!==c&&(t=c)}}return t}o=o||0;for(var i=e.length;i>0&&e[i-1][2]>o;i--)e[i]=e[i-1];e[i]=[a,r,o]},d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},a=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);d.r(o);var n={};t=t||[null,a({}),a([]),a(a)];for(var b=2&r&&e;"object"==typeof b&&!~t.indexOf(b);b=a(b))Object.getOwnPropertyNames(b).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,d.d(o,n),o},d.d=(e,t)=>{for(var a in t)d.o(t,a)&&!d.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((t,a)=>(d.f[a](e,t),t)),[])),d.u=e=>"assets/js/"+({53:"935f2afb",63:"8a6052eb",94:"1bdd165f",126:"3c6c3bb0",154:"f2d2b077",195:"c4f5d8e4",278:"01df2f6c",288:"ad895e75",298:"c8229a80",350:"b5dde711",368:"a94703ab",381:"501445cb",430:"7ad239b9",434:"0f1b22a8",456:"14f61f32",471:"d24847ef",494:"698581a0",518:"a7bd4aaa",618:"559cb848",625:"77ba9e12",661:"5e95c892",671:"1c6b47cb",690:"f69ec364",725:"add06ab1",884:"d77361a5",918:"17896441",920:"1a4e3797",940:"aa9e97dd",951:"6bbd6f71",968:"a4410d65"}[e]||e)+"."+{53:"acfe3c54",63:"d288d3e8",72:"57ebe618",94:"0d02bf07",126:"ac86c9bb",154:"1fe6a2cf",195:"0593c39e",278:"9ce2aeb0",288:"fba69aeb",298:"1e5ae667",350:"fb96c550",368:"310ffec2",381:"c86ede60",426:"dc1cd7d1",430:"d78ac751",434:"4658a0fe",456:"07c43acc",471:"a32f7301",494:"eb08a5e7",518:"1d72542c",618:"2f5d0875",625:"319083fc",661:"dd48221b",671:"0063f2b8",690:"1556e56b",725:"50727a9c",884:"ebc4b2b7",894:"c8bd6124",918:"0a1e7ec5",920:"592ec7e6",940:"30cf9ea0",945:"8f5c5b7a",951:"71aba00c",968:"b5d7163d"}[e]+".js",d.miniCssF=e=>{},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o="react-native-testing-library-website:",d.l=(e,t,a,n)=>{if(r[e])r[e].push(t);else{var b,f;if(void 0!==a)for(var c=document.getElementsByTagName("script"),i=0;i<c.length;i++){var l=c[i];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==o+a){b=l;break}}b||(f=!0,(b=document.createElement("script")).charset="utf-8",b.timeout=120,d.nc&&b.setAttribute("nonce",d.nc),b.setAttribute("data-webpack",o+a),b.src=e),r[e]=[t];var u=(t,a)=>{b.onerror=b.onload=null,clearTimeout(s);var o=r[e];if(delete r[e],b.parentNode&&b.parentNode.removeChild(b),o&&o.forEach((e=>e(a))),t)return t(a)},s=setTimeout(u.bind(null,void 0,{type:"timeout",target:b}),12e4);b.onerror=u.bind(null,b.onerror),b.onload=u.bind(null,b.onload),f&&document.head.appendChild(b)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/react-native-testing-library/",d.gca=function(e){return e={17896441:"918","935f2afb":"53","8a6052eb":"63","1bdd165f":"94","3c6c3bb0":"126",f2d2b077:"154",c4f5d8e4:"195","01df2f6c":"278",ad895e75:"288",c8229a80:"298",b5dde711:"350",a94703ab:"368","501445cb":"381","7ad239b9":"430","0f1b22a8":"434","14f61f32":"456",d24847ef:"471","698581a0":"494",a7bd4aaa:"518","559cb848":"618","77ba9e12":"625","5e95c892":"661","1c6b47cb":"671",f69ec364:"690",add06ab1:"725",d77361a5:"884","1a4e3797":"920",aa9e97dd:"940","6bbd6f71":"951",a4410d65:"968"}[e]||e,d.p+d.u(e)},(()=>{var e={303:0,532:0};d.f.j=(t,a)=>{var r=d.o(e,t)?e[t]:void 0;if(0!==r)if(r)a.push(r[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var o=new Promise(((a,o)=>r=e[t]=[a,o]));a.push(r[2]=o);var n=d.p+d.u(t),b=new Error;d.l(n,(a=>{if(d.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=a&&("load"===a.type?"missing":a.type),n=a&&a.target&&a.target.src;b.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",b.name="ChunkLoadError",b.type=o,b.request=n,r[1](b)}}),"chunk-"+t,t)}},d.O.j=t=>0===e[t];var t=(t,a)=>{var r,o,n=a[0],b=a[1],f=a[2],c=0;if(n.some((t=>0!==e[t]))){for(r in b)d.o(b,r)&&(d.m[r]=b[r]);if(f)var i=f(d)}for(t&&t(a);c<n.length;c++)o=n[c],d.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return d.O(i)},a=self.webpackChunkreact_native_testing_library_website=self.webpackChunkreact_native_testing_library_website||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})()})();
-1
View File
@@ -1 +0,0 @@
(()=>{"use strict";var e,t,a,r,f,o={},d={};function n(e){var t=d[e];if(void 0!==t)return t.exports;var a=d[e]={id:e,loaded:!1,exports:{}};return o[e].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.m=o,n.c=d,e=[],n.O=(t,a,r,f)=>{if(!a){var o=1/0;for(c=0;c<e.length;c++){a=e[c][0],r=e[c][1],f=e[c][2];for(var d=!0,b=0;b<a.length;b++)(!1&f||o>=f)&&Object.keys(n.O).every((e=>n.O[e](a[b])))?a.splice(b--,1):(d=!1,f<o&&(o=f));if(d){e.splice(c--,1);var i=r();void 0!==i&&(t=i)}}return t}f=f||0;for(var c=e.length;c>0&&e[c-1][2]>f;c--)e[c]=e[c-1];e[c]=[a,r,f]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},a=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var f=Object.create(null);n.r(f);var o={};t=t||[null,a({}),a([]),a(a)];for(var d=2&r&&e;"object"==typeof d&&!~t.indexOf(d);d=a(d))Object.getOwnPropertyNames(d).forEach((t=>o[t]=()=>e[t]));return o.default=()=>e,n.d(f,o),f},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,a)=>(n.f[a](e,t),t)),[])),n.u=e=>"assets/js/"+({53:"935f2afb",63:"8a6052eb",94:"1bdd165f",126:"3c6c3bb0",154:"f2d2b077",195:"c4f5d8e4",278:"01df2f6c",288:"ad895e75",298:"c8229a80",350:"b5dde711",368:"a94703ab",381:"501445cb",430:"7ad239b9",434:"0f1b22a8",456:"14f61f32",471:"d24847ef",494:"698581a0",518:"a7bd4aaa",618:"559cb848",625:"77ba9e12",661:"5e95c892",671:"1c6b47cb",690:"f69ec364",725:"add06ab1",884:"d77361a5",918:"17896441",920:"1a4e3797",940:"aa9e97dd",951:"6bbd6f71",968:"a4410d65"}[e]||e)+"."+{53:"acfe3c54",63:"d288d3e8",72:"57ebe618",94:"0d02bf07",126:"ac86c9bb",154:"1fe6a2cf",195:"0593c39e",278:"9ce2aeb0",288:"fba69aeb",298:"87ec1e8f",350:"fb96c550",368:"310ffec2",381:"c86ede60",426:"dc1cd7d1",430:"9d775967",434:"4658a0fe",456:"07c43acc",471:"a32f7301",494:"65ef15c7",518:"1d72542c",618:"2f5d0875",625:"7c7fa4d8",661:"dd48221b",671:"0063f2b8",690:"e1bd5bf9",725:"a1119996",884:"9a82e889",894:"c8bd6124",918:"0a1e7ec5",920:"592ec7e6",940:"30cf9ea0",945:"8f5c5b7a",951:"71aba00c",968:"b5d7163d"}[e]+".js",n.miniCssF=e=>{},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},f="react-native-testing-library-website:",n.l=(e,t,a,o)=>{if(r[e])r[e].push(t);else{var d,b;if(void 0!==a)for(var i=document.getElementsByTagName("script"),c=0;c<i.length;c++){var l=i[c];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==f+a){d=l;break}}d||(b=!0,(d=document.createElement("script")).charset="utf-8",d.timeout=120,n.nc&&d.setAttribute("nonce",n.nc),d.setAttribute("data-webpack",f+a),d.src=e),r[e]=[t];var u=(t,a)=>{d.onerror=d.onload=null,clearTimeout(s);var f=r[e];if(delete r[e],d.parentNode&&d.parentNode.removeChild(d),f&&f.forEach((e=>e(a))),t)return t(a)},s=setTimeout(u.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=u.bind(null,d.onerror),d.onload=u.bind(null,d.onload),b&&document.head.appendChild(d)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/react-native-testing-library/",n.gca=function(e){return e={17896441:"918","935f2afb":"53","8a6052eb":"63","1bdd165f":"94","3c6c3bb0":"126",f2d2b077:"154",c4f5d8e4:"195","01df2f6c":"278",ad895e75:"288",c8229a80:"298",b5dde711:"350",a94703ab:"368","501445cb":"381","7ad239b9":"430","0f1b22a8":"434","14f61f32":"456",d24847ef:"471","698581a0":"494",a7bd4aaa:"518","559cb848":"618","77ba9e12":"625","5e95c892":"661","1c6b47cb":"671",f69ec364:"690",add06ab1:"725",d77361a5:"884","1a4e3797":"920",aa9e97dd:"940","6bbd6f71":"951",a4410d65:"968"}[e]||e,n.p+n.u(e)},(()=>{var e={303:0,532:0};n.f.j=(t,a)=>{var r=n.o(e,t)?e[t]:void 0;if(0!==r)if(r)a.push(r[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var f=new Promise(((a,f)=>r=e[t]=[a,f]));a.push(r[2]=f);var o=n.p+n.u(t),d=new Error;n.l(o,(a=>{if(n.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var f=a&&("load"===a.type?"missing":a.type),o=a&&a.target&&a.target.src;d.message="Loading chunk "+t+" failed.\n("+f+": "+o+")",d.name="ChunkLoadError",d.type=f,d.request=o,r[1](d)}}),"chunk-"+t,t)}},n.O.j=t=>0===e[t];var t=(t,a)=>{var r,f,o=a[0],d=a[1],b=a[2],i=0;if(o.some((t=>0!==e[t]))){for(r in d)n.o(d,r)&&(n.m[r]=d[r]);if(b)var c=b(n)}for(t&&t(a);i<o.length;i++)f=o[i],n.o(e,f)&&e[f]&&e[f][0](),e[f]=0;return n.O(c)},a=self.webpackChunkreact_native_testing_library_website=self.webpackChunkreact_native_testing_library_website||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})()})();
File diff suppressed because one or more lines are too long
+10 -10
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">ESLint Plugin Testing Library Compatibility | React Native Testing Library</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" name="twitter:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" property="og:url" content="https://callstack.github.io/react-native-testing-library/docs/eslint-plugin-testing-library"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="ESLint Plugin Testing Library Compatibility | React Native Testing Library"><meta data-rh="true" name="description" content="Most of the rules of the eslint-plugin-testing-library are compatible with this library except the following:"><meta data-rh="true" property="og:description" content="Most of the rules of the eslint-plugin-testing-library are compatible with this library except the following:"><link data-rh="true" rel="icon" href="/react-native-testing-library/img/owl.png"><link data-rh="true" rel="canonical" href="https://callstack.github.io/react-native-testing-library/docs/eslint-plugin-testing-library"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/eslint-plugin-testing-library" hreflang="en"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/eslint-plugin-testing-library" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://6CJ0BV6AVN-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="React Native Testing Library" href="/react-native-testing-library/opensearch.xml"><link rel="stylesheet" href="/react-native-testing-library/assets/css/styles.afd276ca.css">
<script src="/react-native-testing-library/assets/js/runtime~main.e24eefd6.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/runtime~main.33c6f488.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/main.3e94263e.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">FAQ | React Native Testing Library</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" name="twitter:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" property="og:url" content="https://callstack.github.io/react-native-testing-library/docs/faq"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="FAQ | React Native Testing Library"><meta data-rh="true" name="description" content="Can I test the native features of React Native apps?"><meta data-rh="true" property="og:description" content="Can I test the native features of React Native apps?"><link data-rh="true" rel="icon" href="/react-native-testing-library/img/owl.png"><link data-rh="true" rel="canonical" href="https://callstack.github.io/react-native-testing-library/docs/faq"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/faq" hreflang="en"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/faq" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://6CJ0BV6AVN-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="React Native Testing Library" href="/react-native-testing-library/opensearch.xml"><link rel="stylesheet" href="/react-native-testing-library/assets/css/styles.afd276ca.css">
<script src="/react-native-testing-library/assets/js/runtime~main.e24eefd6.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/runtime~main.33c6f488.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/main.3e94263e.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">Getting Started | React Native Testing Library</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" name="twitter:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" property="og:url" content="https://callstack.github.io/react-native-testing-library/docs/getting-started"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Getting Started | React Native Testing Library"><meta data-rh="true" name="description" content="The problem"><meta data-rh="true" property="og:description" content="The problem"><link data-rh="true" rel="icon" href="/react-native-testing-library/img/owl.png"><link data-rh="true" rel="canonical" href="https://callstack.github.io/react-native-testing-library/docs/getting-started"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/getting-started" hreflang="en"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/getting-started" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://6CJ0BV6AVN-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="React Native Testing Library" href="/react-native-testing-library/opensearch.xml"><link rel="stylesheet" href="/react-native-testing-library/assets/css/styles.afd276ca.css">
<script src="/react-native-testing-library/assets/js/runtime~main.e24eefd6.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/runtime~main.33c6f488.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/main.3e94263e.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">How Should I Query? | React Native Testing Library</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" name="twitter:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" property="og:url" content="https://callstack.github.io/react-native-testing-library/docs/how-should-i-query"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="How Should I Query? | React Native Testing Library"><meta data-rh="true" name="description" content="React Native Testing Library provides various query types, allowing great flexibility in finding views appropriate for your tests. At the same time, the number of queries might be confusing. This guide aims to help you pick the correct queries for your test scenarios."><meta data-rh="true" property="og:description" content="React Native Testing Library provides various query types, allowing great flexibility in finding views appropriate for your tests. At the same time, the number of queries might be confusing. This guide aims to help you pick the correct queries for your test scenarios."><link data-rh="true" rel="icon" href="/react-native-testing-library/img/owl.png"><link data-rh="true" rel="canonical" href="https://callstack.github.io/react-native-testing-library/docs/how-should-i-query"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/how-should-i-query" hreflang="en"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/how-should-i-query" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://6CJ0BV6AVN-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="React Native Testing Library" href="/react-native-testing-library/opensearch.xml"><link rel="stylesheet" href="/react-native-testing-library/assets/css/styles.afd276ca.css">
<script src="/react-native-testing-library/assets/js/runtime~main.e24eefd6.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/runtime~main.33c6f488.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/main.3e94263e.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">Jest Matchers | React Native Testing Library</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" name="twitter:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" property="og:url" content="https://callstack.github.io/react-native-testing-library/docs/jest-matchers"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Jest Matchers | React Native Testing Library"><meta data-rh="true" name="description" content="Built-in Jest matchers require RNTL v12.4.0 or later."><meta data-rh="true" property="og:description" content="Built-in Jest matchers require RNTL v12.4.0 or later."><link data-rh="true" rel="icon" href="/react-native-testing-library/img/owl.png"><link data-rh="true" rel="canonical" href="https://callstack.github.io/react-native-testing-library/docs/jest-matchers"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/jest-matchers" hreflang="en"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/jest-matchers" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://6CJ0BV6AVN-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="React Native Testing Library" href="/react-native-testing-library/opensearch.xml"><link rel="stylesheet" href="/react-native-testing-library/assets/css/styles.afd276ca.css">
<script src="/react-native-testing-library/assets/js/runtime~main.e24eefd6.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/runtime~main.33c6f488.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/main.3e94263e.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">Migration from Jest Native matchers | React Native Testing Library</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" name="twitter:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" property="og:url" content="https://callstack.github.io/react-native-testing-library/docs/migration-jest-native"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Migration from Jest Native matchers | React Native Testing Library"><meta data-rh="true" name="description" content="This guide describes the steps necessary to migrate from legacy Jest Native matchers v5 to built-in Jest matchers."><meta data-rh="true" property="og:description" content="This guide describes the steps necessary to migrate from legacy Jest Native matchers v5 to built-in Jest matchers."><link data-rh="true" rel="icon" href="/react-native-testing-library/img/owl.png"><link data-rh="true" rel="canonical" href="https://callstack.github.io/react-native-testing-library/docs/migration-jest-native"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/migration-jest-native" hreflang="en"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/migration-jest-native" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://6CJ0BV6AVN-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="React Native Testing Library" href="/react-native-testing-library/opensearch.xml"><link rel="stylesheet" href="/react-native-testing-library/assets/css/styles.afd276ca.css">
<script src="/react-native-testing-library/assets/js/runtime~main.e24eefd6.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/runtime~main.33c6f488.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/main.3e94263e.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
+2 -2
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">Migration to 11.0 | React Native Testing Library</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" name="twitter:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" property="og:url" content="https://callstack.github.io/react-native-testing-library/docs/migration-v11"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Migration to 11.0 | React Native Testing Library"><meta data-rh="true" name="description" content="Migration to React Native Testing Library version 11 from version 9.x or 10.x should be a relatively easy task due small amount of breaking changes."><meta data-rh="true" property="og:description" content="Migration to React Native Testing Library version 11 from version 9.x or 10.x should be a relatively easy task due small amount of breaking changes."><link data-rh="true" rel="icon" href="/react-native-testing-library/img/owl.png"><link data-rh="true" rel="canonical" href="https://callstack.github.io/react-native-testing-library/docs/migration-v11"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/migration-v11" hreflang="en"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/migration-v11" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://6CJ0BV6AVN-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="React Native Testing Library" href="/react-native-testing-library/opensearch.xml"><link rel="stylesheet" href="/react-native-testing-library/assets/css/styles.afd276ca.css">
<script src="/react-native-testing-library/assets/js/runtime~main.e24eefd6.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/runtime~main.33c6f488.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/main.3e94263e.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
@@ -15,7 +15,7 @@
<p>If you use fake timers in any of your tests you should update your Jest dependencies to version 28. This is due to the fact that <a href="https://jestjs.io/docs/jest-object#jestusefaketimersfaketimersconfig" target="_blank" rel="noopener noreferrer"><code>jest.useFakeTimers()</code> config structure</a> has changed.</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="refactor-legacy-waitforoptions-position">Refactor legacy <code>waitForOptions</code> position<a href="#refactor-legacy-waitforoptions-position" class="hash-link" aria-label="Direct link to refactor-legacy-waitforoptions-position" title="Direct link to refactor-legacy-waitforoptions-position">​</a></h3>
<p>In version 9 we introducted query <code>options</code> parameters for each query type. This affected all <code>findBy</code> and <code>findAllBy</code> queries because their signatures changed e.g. from:</p>
<div class="language-ts codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-ts codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">function</span><span class="token plain"> </span><span class="token function" style="color:#d73a49">findByText</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">text</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> TextMatch</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> waitForOptions</span><span class="token operator" style="color:#393A34">?</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> WaitForOptions</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">function</span><span class="token plain"> </span><span class="token function" style="color:#d73a49">findAllByText</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">text</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> TextMatch</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> waitForOptions</span><span class="token operator" style="color:#393A34">?</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> WaitForOptions</span><span class="token punctuation" style="color:#393A34">)</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<div class="language-ts codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-ts codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">function</span><span class="token plain"> </span><span class="token function" style="color:#d73a49">findByText</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">text</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> TextMatch</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> waitForOptions</span><span class="token operator" style="color:#393A34">?</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> WaitForOptions</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">function</span><span class="token plain"> </span><span class="token function" style="color:#d73a49">findAllByText</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">text</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> TextMatch</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> waitForOptions</span><span class="token operator" style="color:#393A34">?</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> WaitForOptions</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<p>to</p>
<div class="language-ts codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-ts codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">function</span><span class="token plain"> </span><span class="token function" style="color:#d73a49">findByText</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">text</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> TextMatch</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> options</span><span class="token operator" style="color:#393A34">?</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> TextMatchOptions</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> waitForOptions</span><span class="token operator" style="color:#393A34">?</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> WaitForOptions</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">function</span><span class="token plain"> </span><span class="token function" style="color:#d73a49">findAllByText</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">text</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> TextMatch</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> options</span><span class="token operator" style="color:#393A34">?</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> TextMatchOptions</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> waitForOptions</span><span class="token operator" style="color:#393A34">?</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> WaitForOptions</span><span class="token punctuation" style="color:#393A34">)</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<p>In order to facilitate transition, in version 9 and 10, we provided a temporary possibility to pass <code>WaitForOptions</code> like <code>timeout</code>, <code>interval</code>, etc inside <code>options</code> argument. From this release we require passing these as the proper third parameter.</p>
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">Migration to 12.0 | React Native Testing Library</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" name="twitter:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" property="og:url" content="https://callstack.github.io/react-native-testing-library/docs/migration-v12"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Migration to 12.0 | React Native Testing Library"><meta data-rh="true" name="description" content="From v12.4:"><meta data-rh="true" property="og:description" content="From v12.4:"><link data-rh="true" rel="icon" href="/react-native-testing-library/img/owl.png"><link data-rh="true" rel="canonical" href="https://callstack.github.io/react-native-testing-library/docs/migration-v12"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/migration-v12" hreflang="en"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/migration-v12" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://6CJ0BV6AVN-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="React Native Testing Library" href="/react-native-testing-library/opensearch.xml"><link rel="stylesheet" href="/react-native-testing-library/assets/css/styles.afd276ca.css">
<script src="/react-native-testing-library/assets/js/runtime~main.e24eefd6.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/runtime~main.33c6f488.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/main.3e94263e.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
+3 -3
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">Migration to 2.0 | React Native Testing Library</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" name="twitter:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" property="og:url" content="https://callstack.github.io/react-native-testing-library/docs/migration-v2"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Migration to 2.0 | React Native Testing Library"><meta data-rh="true" name="description" content="This guide describes steps necessary to migrate from React Native Testing Library v1.x to v2.0."><meta data-rh="true" property="og:description" content="This guide describes steps necessary to migrate from React Native Testing Library v1.x to v2.0."><link data-rh="true" rel="icon" href="/react-native-testing-library/img/owl.png"><link data-rh="true" rel="canonical" href="https://callstack.github.io/react-native-testing-library/docs/migration-v2"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/migration-v2" hreflang="en"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/migration-v2" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://6CJ0BV6AVN-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="React Native Testing Library" href="/react-native-testing-library/opensearch.xml"><link rel="stylesheet" href="/react-native-testing-library/assets/css/styles.afd276ca.css">
<script src="/react-native-testing-library/assets/js/runtime~main.e24eefd6.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/runtime~main.33c6f488.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/main.3e94263e.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
@@ -33,9 +33,9 @@
</ul>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="waitfor-api-changes">WaitFor API changes<a href="#waitfor-api-changes" class="hash-link" aria-label="Direct link to WaitFor API changes" title="Direct link to WaitFor API changes">​</a></h2>
<p>We renamed <code>waitForElement</code> function to <code>waitFor</code> for consistency with React Testing Library. Additionally, the signature has slightly changed from:</p>
<div class="language-jsx codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-jsx codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword module" style="color:#00009f">export</span><span class="token plain"> </span><span class="token keyword module" style="color:#00009f">default</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">function</span><span class="token plain"> waitForElement</span><span class="token tag punctuation" style="color:#393A34">&lt;</span><span class="token tag class-name" style="color:#00009f">T</span><span class="token tag punctuation" style="color:#393A34">&gt;</span><span class="token plain-text">(</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text"> expectation: () =&gt; T,</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text"> timeout?: number,</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text"> interval?: number</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text">): Promise</span><span class="token tag punctuation" style="color:#393A34">&lt;</span><span class="token tag class-name" style="color:#00009f">T</span><span class="token tag punctuation" style="color:#393A34">&gt;</span><span class="token plain-text"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token punctuation" style="color:#393A34">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<div class="language-jsx codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-jsx codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword module" style="color:#00009f">export</span><span class="token plain"> </span><span class="token keyword module" style="color:#00009f">default</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">function</span><span class="token plain"> waitForElement</span><span class="token tag punctuation" style="color:#393A34">&lt;</span><span class="token tag class-name" style="color:#00009f">T</span><span class="token tag punctuation" style="color:#393A34">&gt;</span><span class="token plain-text">(</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text"> expectation: () =&gt; T,</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text"> timeout?: number,</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text"> interval?: number,</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text">): Promise</span><span class="token tag punctuation" style="color:#393A34">&lt;</span><span class="token tag class-name" style="color:#00009f">T</span><span class="token tag punctuation" style="color:#393A34">&gt;</span><span class="token plain-text"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token punctuation" style="color:#393A34">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<p>to:</p>
<div class="language-jsx codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-jsx codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword module" style="color:#00009f">export</span><span class="token plain"> </span><span class="token keyword module" style="color:#00009f">default</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">function</span><span class="token plain"> waitFor</span><span class="token tag punctuation" style="color:#393A34">&lt;</span><span class="token tag class-name" style="color:#00009f">T</span><span class="token tag punctuation" style="color:#393A34">&gt;</span><span class="token plain-text">(</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text"> expectation: () =&gt; T,</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text"> options: </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> timeout</span><span class="token operator" style="color:#393A34">?</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> number</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> interval</span><span class="token operator" style="color:#393A34">?</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> number</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain-text"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text">): Promise</span><span class="token tag punctuation" style="color:#393A34">&lt;</span><span class="token tag class-name" style="color:#00009f">T</span><span class="token tag punctuation" style="color:#393A34">&gt;</span><span class="token plain-text"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token punctuation" style="color:#393A34">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<div class="language-jsx codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-jsx codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword module" style="color:#00009f">export</span><span class="token plain"> </span><span class="token keyword module" style="color:#00009f">default</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">function</span><span class="token plain"> waitFor</span><span class="token tag punctuation" style="color:#393A34">&lt;</span><span class="token tag class-name" style="color:#00009f">T</span><span class="token tag punctuation" style="color:#393A34">&gt;</span><span class="token plain-text">(</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text"> expectation: () =&gt; T,</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text"> options: </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> timeout</span><span class="token operator" style="color:#393A34">?</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> number</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> interval</span><span class="token operator" style="color:#393A34">?</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> number</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain-text">,</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text">): Promise</span><span class="token tag punctuation" style="color:#393A34">&lt;</span><span class="token tag class-name" style="color:#00009f">T</span><span class="token tag punctuation" style="color:#393A34">&gt;</span><span class="token plain-text"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token punctuation" style="color:#393A34">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<p>Both changes should improve code readibility.</p>
<p><code>waitFor</code> calls (and hence also <code>findBy</code> queries) are now wrapped in <code>act</code> by default, so that you should no longer need to use <code>act</code> directly in your tests.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>tip</div><div class="admonitionContent_BuS1"><p>You can usually avoid <code>waitFor</code> by a proper use of <code>findBy</code> asynchronous queries. It will result in more streamlined testing experience.</p></div></div>
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">Migration to 7.0 | React Native Testing Library</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" name="twitter:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" property="og:url" content="https://callstack.github.io/react-native-testing-library/docs/migration-v7"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Migration to 7.0 | React Native Testing Library"><meta data-rh="true" name="description" content="We renamed the react-native-testing-library npm package to @testing-library/react-native, officially joining the &quot;Testing Library&quot; family 🎉."><meta data-rh="true" property="og:description" content="We renamed the react-native-testing-library npm package to @testing-library/react-native, officially joining the &quot;Testing Library&quot; family 🎉."><link data-rh="true" rel="icon" href="/react-native-testing-library/img/owl.png"><link data-rh="true" rel="canonical" href="https://callstack.github.io/react-native-testing-library/docs/migration-v7"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/migration-v7" hreflang="en"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/migration-v7" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://6CJ0BV6AVN-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="React Native Testing Library" href="/react-native-testing-library/opensearch.xml"><link rel="stylesheet" href="/react-native-testing-library/assets/css/styles.afd276ca.css">
<script src="/react-native-testing-library/assets/js/runtime~main.e24eefd6.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/runtime~main.33c6f488.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/main.3e94263e.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
+2 -2
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">Migration to 9.0 | React Native Testing Library</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" name="twitter:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" property="og:url" content="https://callstack.github.io/react-native-testing-library/docs/migration-v9"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Migration to 9.0 | React Native Testing Library"><meta data-rh="true" name="description" content="Version 7.0 brought React Native Testing Library into the @testing-library family. Since it has been implemented independently from its web counterpart – the React Testing Library – there are some differences in the API and behavior. Version 9.0 solves several of these problems."><meta data-rh="true" property="og:description" content="Version 7.0 brought React Native Testing Library into the @testing-library family. Since it has been implemented independently from its web counterpart – the React Testing Library – there are some differences in the API and behavior. Version 9.0 solves several of these problems."><link data-rh="true" rel="icon" href="/react-native-testing-library/img/owl.png"><link data-rh="true" rel="canonical" href="https://callstack.github.io/react-native-testing-library/docs/migration-v9"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/migration-v9" hreflang="en"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/migration-v9" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://6CJ0BV6AVN-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="React Native Testing Library" href="/react-native-testing-library/opensearch.xml"><link rel="stylesheet" href="/react-native-testing-library/assets/css/styles.afd276ca.css">
<script src="/react-native-testing-library/assets/js/runtime~main.e24eefd6.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/runtime~main.33c6f488.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/main.3e94263e.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
@@ -20,7 +20,7 @@
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="reverted-matching-text-across-several-nodes">Reverted matching text across several nodes<a href="#reverted-matching-text-across-several-nodes" class="hash-link" aria-label="Direct link to Reverted matching text across several nodes" title="Direct link to Reverted matching text across several nodes">​</a></h2>
<div class="theme-admonition theme-admonition-caution admonition_xJq3 alert alert--warning"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"></path></svg></span>caution</div><div class="admonitionContent_BuS1"><p>This is a breaking change.</p></div></div>
<p>In v1.14 we&#x27;ve introduced a feature allowing to match text when it&#x27;s spread across several nodes:</p>
<div class="language-tsx codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-tsx codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">const</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"> getByText </span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token function" style="color:#d73a49">render</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token tag punctuation" style="color:#393A34">&lt;</span><span class="token tag class-name" style="color:#00009f">Text</span><span class="token tag punctuation" style="color:#393A34">&gt;</span><span class="token plain-text"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text"> Hello </span><span class="token tag punctuation" style="color:#393A34">&lt;</span><span class="token tag class-name" style="color:#00009f">Text</span><span class="token tag punctuation" style="color:#393A34">&gt;</span><span class="token plain-text">world</span><span class="token tag punctuation" style="color:#393A34">&lt;/</span><span class="token tag class-name" style="color:#00009f">Text</span><span class="token tag punctuation" style="color:#393A34">&gt;</span><span class="token plain-text"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text"> </span><span class="token tag punctuation" style="color:#393A34">&lt;/</span><span class="token tag class-name" style="color:#00009f">Text</span><span class="token tag punctuation" style="color:#393A34">&gt;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token function" style="color:#d73a49">getByText</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string" style="color:#e3116c">&#x27;Hello world&#x27;</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"> </span><span class="token comment" style="color:#999988;font-style:italic">// matches</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<div class="language-tsx codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-tsx codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">const</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"> getByText </span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token function" style="color:#d73a49">render</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token tag punctuation" style="color:#393A34">&lt;</span><span class="token tag class-name" style="color:#00009f">Text</span><span class="token tag punctuation" style="color:#393A34">&gt;</span><span class="token plain-text"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text"> Hello </span><span class="token tag punctuation" style="color:#393A34">&lt;</span><span class="token tag class-name" style="color:#00009f">Text</span><span class="token tag punctuation" style="color:#393A34">&gt;</span><span class="token plain-text">world</span><span class="token tag punctuation" style="color:#393A34">&lt;/</span><span class="token tag class-name" style="color:#00009f">Text</span><span class="token tag punctuation" style="color:#393A34">&gt;</span><span class="token plain-text"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text"> </span><span class="token tag punctuation" style="color:#393A34">&lt;/</span><span class="token tag class-name" style="color:#00009f">Text</span><span class="token tag punctuation" style="color:#393A34">&gt;</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token function" style="color:#d73a49">getByText</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string" style="color:#e3116c">&#x27;Hello world&#x27;</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"> </span><span class="token comment" style="color:#999988;font-style:italic">// matches</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<p>However this behavior was different than the web one, and wouldn&#x27;t always be straightforward to reason about. For instance it could match text nodes far from each other on the screen. It also prevented us from implementing the string precision API. From v9, this type of match will not work.</p>
<p>A work around is to use <code>within</code>:</p>
<div class="language-tsx codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-tsx codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">import</span><span class="token plain"> </span><span class="token imports punctuation" style="color:#393A34">{</span><span class="token imports maybe-class-name">Text</span><span class="token imports punctuation" style="color:#393A34">}</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">&#x27;react-native&#x27;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">import</span><span class="token plain"> </span><span class="token imports punctuation" style="color:#393A34">{</span><span class="token imports">render</span><span class="token imports punctuation" style="color:#393A34">,</span><span class="token imports"> within</span><span class="token imports punctuation" style="color:#393A34">}</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">&#x27;@testing-library/react-native&#x27;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">const</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain">getByText</span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token function" style="color:#d73a49">render</span><span class="token punctuation" style="color:#393A34">(</span><span class="token tag punctuation" style="color:#393A34">&lt;</span><span class="token tag class-name" style="color:#00009f">Text</span><span class="token tag punctuation" style="color:#393A34">&gt;</span><span class="token plain-text">Hello </span><span class="token tag punctuation" style="color:#393A34">&lt;</span><span class="token tag class-name" style="color:#00009f">Text</span><span class="token tag punctuation" style="color:#393A34">&gt;</span><span class="token plain-text">world&lt;/Text</span><span class="token tag punctuation" style="color:#393A34">&lt;/</span><span class="token tag class-name" style="color:#00009f">Text</span><span class="token tag punctuation" style="color:#393A34">&gt;</span><span class="token plain-text">)</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain-text">within(getByText(&#x27;Hello&#x27;, </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain">exact</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">false</span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain-text">)).getByText(&#x27;world&#x27;)</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">React Navigation | React Native Testing Library</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" name="twitter:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" property="og:url" content="https://callstack.github.io/react-native-testing-library/docs/react-navigation"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="React Navigation | React Native Testing Library"><meta data-rh="true" name="description" content="This examples has not been updated for a long time and not showcase current recommended testing practices. We plan to update this document soon."><meta data-rh="true" property="og:description" content="This examples has not been updated for a long time and not showcase current recommended testing practices. We plan to update this document soon."><link data-rh="true" rel="icon" href="/react-native-testing-library/img/owl.png"><link data-rh="true" rel="canonical" href="https://callstack.github.io/react-native-testing-library/docs/react-navigation"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/react-navigation" hreflang="en"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/react-navigation" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://6CJ0BV6AVN-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="React Native Testing Library" href="/react-native-testing-library/opensearch.xml"><link rel="stylesheet" href="/react-native-testing-library/assets/css/styles.afd276ca.css">
<script src="/react-native-testing-library/assets/js/runtime~main.e24eefd6.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/runtime~main.33c6f488.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/main.3e94263e.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">Testing Environment | React Native Testing Library</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" name="twitter:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" property="og:url" content="https://callstack.github.io/react-native-testing-library/docs/testing-env"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Testing Environment | React Native Testing Library"><meta data-rh="true" name="description" content="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."><meta data-rh="true" property="og:description" content="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."><link data-rh="true" rel="icon" href="/react-native-testing-library/img/owl.png"><link data-rh="true" rel="canonical" href="https://callstack.github.io/react-native-testing-library/docs/testing-env"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/testing-env" hreflang="en"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/testing-env" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://6CJ0BV6AVN-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="React Native Testing Library" href="/react-native-testing-library/opensearch.xml"><link rel="stylesheet" href="/react-native-testing-library/assets/css/styles.afd276ca.css">
<script src="/react-native-testing-library/assets/js/runtime~main.e24eefd6.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/runtime~main.33c6f488.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/main.3e94263e.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">Troubleshooting | React Native Testing Library</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" name="twitter:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" property="og:url" content="https://callstack.github.io/react-native-testing-library/docs/troubleshooting"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Troubleshooting | React Native Testing Library"><meta data-rh="true" name="description" content="This guide describes common issues found by users when integrating React Native Test Library to their projects:"><meta data-rh="true" property="og:description" content="This guide describes common issues found by users when integrating React Native Test Library to their projects:"><link data-rh="true" rel="icon" href="/react-native-testing-library/img/owl.png"><link data-rh="true" rel="canonical" href="https://callstack.github.io/react-native-testing-library/docs/troubleshooting"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/troubleshooting" hreflang="en"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/troubleshooting" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://6CJ0BV6AVN-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="React Native Testing Library" href="/react-native-testing-library/opensearch.xml"><link rel="stylesheet" href="/react-native-testing-library/assets/css/styles.afd276ca.css">
<script src="/react-native-testing-library/assets/js/runtime~main.e24eefd6.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/runtime~main.33c6f488.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/main.3e94263e.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">Understanding Act function | React Native Testing Library</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" name="twitter:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" property="og:url" content="https://callstack.github.io/react-native-testing-library/docs/understanding-act"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Understanding Act function | React Native Testing Library"><meta data-rh="true" name="description" content="When 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."><meta data-rh="true" property="og:description" content="When 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."><link data-rh="true" rel="icon" href="/react-native-testing-library/img/owl.png"><link data-rh="true" rel="canonical" href="https://callstack.github.io/react-native-testing-library/docs/understanding-act"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/understanding-act" hreflang="en"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/understanding-act" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://6CJ0BV6AVN-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="React Native Testing Library" href="/react-native-testing-library/opensearch.xml"><link rel="stylesheet" href="/react-native-testing-library/assets/css/styles.afd276ca.css">
<script src="/react-native-testing-library/assets/js/runtime~main.e24eefd6.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/runtime~main.33c6f488.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/main.3e94263e.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">User Event | React Native Testing Library</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" name="twitter:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" property="og:url" content="https://callstack.github.io/react-native-testing-library/docs/user-event"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="User Event | React Native Testing Library"><meta data-rh="true" name="description" content="User Event interactions require RNTL v12.2.0 or later."><meta data-rh="true" property="og:description" content="User Event interactions require RNTL v12.2.0 or later."><link data-rh="true" rel="icon" href="/react-native-testing-library/img/owl.png"><link data-rh="true" rel="canonical" href="https://callstack.github.io/react-native-testing-library/docs/user-event"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/user-event" hreflang="en"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/docs/user-event" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://6CJ0BV6AVN-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="React Native Testing Library" href="/react-native-testing-library/opensearch.xml"><link rel="stylesheet" href="/react-native-testing-library/assets/css/styles.afd276ca.css">
<script src="/react-native-testing-library/assets/js/runtime~main.e24eefd6.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/runtime~main.33c6f488.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/main.3e94263e.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">React Native Testing Library | React Native Testing Library</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" name="twitter:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" property="og:url" content="https://callstack.github.io/react-native-testing-library/"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="og:title" content="React Native Testing Library | React Native Testing Library"><meta data-rh="true" name="description" content="Helps you to write better tests with less effort."><meta data-rh="true" property="og:description" content="Helps you to write better tests with less effort."><link data-rh="true" rel="icon" href="/react-native-testing-library/img/owl.png"><link data-rh="true" rel="canonical" href="https://callstack.github.io/react-native-testing-library/"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/" hreflang="en"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://6CJ0BV6AVN-dsn.algolia.net" crossorigin="anonymous"><script data-rh="true">function insertBanner(){var n=document.createElement("div");n.id="__docusaurus-base-url-issue-banner-container";n.innerHTML='\n<div id="__docusaurus-base-url-issue-banner" style="border: thick solid red; background-color: rgb(255, 230, 179); margin: 20px; padding: 20px; font-size: 20px;">\n <p style="font-weight: bold; font-size: 30px;">Your Docusaurus site did not load properly.</p>\n <p>A very common reason is a wrong site <a href="https://docusaurus.io/docs/docusaurus.config.js/#baseUrl" style="font-weight: bold;">baseUrl configuration</a>.</p>\n <p>Current configured baseUrl = <span style="font-weight: bold; color: red;">/react-native-testing-library/</span> </p>\n <p>We suggest trying baseUrl = <span id="__docusaurus-base-url-issue-banner-suggestion-container" style="font-weight: bold; color: green;"></span></p>\n</div>\n',document.body.prepend(n);var e=document.getElementById("__docusaurus-base-url-issue-banner-suggestion-container"),s=window.location.pathname,r="/"===s.substr(-1)?s:s+"/";e.innerHTML=r}document.addEventListener("DOMContentLoaded",(function(){void 0===window.docusaurus&&insertBanner()}))</script><link rel="search" type="application/opensearchdescription+xml" title="React Native Testing Library" href="/react-native-testing-library/opensearch.xml"><link rel="stylesheet" href="/react-native-testing-library/assets/css/styles.afd276ca.css">
<script src="/react-native-testing-library/assets/js/runtime~main.e24eefd6.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/runtime~main.33c6f488.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/main.3e94263e.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">Search the documentation | React Native Testing Library</title><meta data-rh="true" property="og:title" content="React Native Testing Library"><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" name="twitter:image" content="https://callstack.github.io/react-native-testing-library/img/owl.png"><meta data-rh="true" property="og:url" content="https://callstack.github.io/react-native-testing-library/search"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="robots" content="noindex, follow"><link data-rh="true" rel="icon" href="/react-native-testing-library/img/owl.png"><link data-rh="true" rel="canonical" href="https://callstack.github.io/react-native-testing-library/search"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/search" hreflang="en"><link data-rh="true" rel="alternate" href="https://callstack.github.io/react-native-testing-library/search" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://6CJ0BV6AVN-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="React Native Testing Library" href="/react-native-testing-library/opensearch.xml"><link rel="stylesheet" href="/react-native-testing-library/assets/css/styles.afd276ca.css">
<script src="/react-native-testing-library/assets/js/runtime~main.e24eefd6.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/runtime~main.33c6f488.js" defer="defer"></script>
<script src="/react-native-testing-library/assets/js/main.3e94263e.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">