Skip to content

Commit 3bafdff

Browse files
committed
Merge remote-tracking branch 'origin/master' into non-recursive-text-match-options
2 parents 6eb071a + 54d970c commit 3bafdff

File tree

8 files changed

+384
-362
lines changed

8 files changed

+384
-362
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ The [public API](https://callstack.github.io/react-native-testing-library/docs/a
153153

154154
React Native Testing Library is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. [Callstack](https://callstack.com) is a group of React and React Native geeks, contact us at [hello@callstack.com](mailto:hello@callstack.com) if you need any help with these or just want to say hi!
155155

156+
Like the project? ⚛️ [Join the team](https://callstack.com/careers/?utm_campaign=Senior_RN&utm_source=github&utm_medium=readme) who does amazing stuff for clients and drives React Native Open Source! 🔥
157+
156158
---
157159

158160
Supported and used by [Rally Health](https://www.rallyhealth.com/careers-home).

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@testing-library/react-native",
3-
"version": "8.0.0-rc.0",
3+
"version": "8.0.0-rc.1",
44
"description": "Simple and complete React Native testing utilities that encourage good testing practices.",
55
"main": "build/index.js",
66
"typings": "./typings/index.d.ts",
@@ -36,7 +36,7 @@
3636
"@release-it/conventional-changelog": "^2.0.0",
3737
"@testing-library/jest-native": "~3.4.3",
3838
"@types/react": "^17.0.0",
39-
"@types/react-native": "^0.63.0",
39+
"@types/react-native": "^0.64.4",
4040
"@types/react-test-renderer": "^17.0.0",
4141
"babel-jest": "^26.0.1",
4242
"conventional-changelog-cli": "^2.0.11",

src/__tests__/byText.test.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,37 @@ test('findByText queries work asynchronously', async () => {
105105
await expect(findAllByText('Some Text')).resolves.toHaveLength(1);
106106
}, 20000);
107107

108+
test.skip('getByText works properly with custom text component', () => {
109+
function BoldText({ children }) {
110+
return <Text>{children}</Text>;
111+
}
112+
113+
expect(
114+
render(
115+
<Text>
116+
<BoldText>Hello</BoldText>
117+
</Text>
118+
).getByText('Hello')
119+
).toBeTruthy();
120+
});
121+
122+
test.skip('getByText works properly with custom text container', () => {
123+
function MyText({ children }) {
124+
return <Text>{children}</Text>;
125+
}
126+
function BoldText({ children }) {
127+
return <Text>{children}</Text>;
128+
}
129+
130+
expect(
131+
render(
132+
<MyText>
133+
<BoldText>Hello</BoldText>
134+
</MyText>
135+
).getByText('Hello')
136+
).toBeTruthy();
137+
});
138+
108139
test('queryByText nested <Image> in <Text> at start', () => {
109140
expect(
110141
render(

typings/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ export interface RenderAPI extends Queries {
342342
update(nextElement: React.ReactElement<any>): void;
343343
rerender(nextElement: React.ReactElement<any>): void;
344344
unmount(nextElement?: React.ReactElement<any>): void;
345-
toJSON(): ReactTestRendererJSON | null;
345+
toJSON(): ReactTestRendererJSON[] | ReactTestRendererJSON | null;
346346
debug: Debug;
347347
container: ReactTestInstance;
348348
}

website/src/css/index.module.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
flex-direction: column;
44
align-items: center;
55
justify-content: center;
6-
padding: 2rem 0;
6+
padding: 2rem var(--ifm-spacing-horizontal);
77
}
88

99
.logo {
@@ -44,6 +44,7 @@
4444
width: 100%;
4545
display: flex;
4646
flex-direction: row;
47+
flex-wrap: wrap;
4748
align-items: center;
4849
justify-content: center;
4950
padding: 5rem 1rem;
@@ -54,6 +55,7 @@
5455
flex-direction: column;
5556
align-items: center;
5657
justify-content: center;
58+
flex: 1;
5759
padding: 0 1rem;
5860
}
5961

website/src/pages/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ export default function Home() {
6767
>
6868
{renderFeatures()}
6969
</div>
70+
<div>
71+
Like the project? ⚛️{' '}
72+
<a href="https://callstack.com/careers/?utm_campaign=Senior_RN&utm_source=github&utm_medium=readme">
73+
Join the team
74+
</a>{' '}
75+
who does amazing stuff for clients and drives React Native Open
76+
Source! 🔥
77+
</div>
7078
</div>
7179
</main>
7280
</Layout>

website/yarn.lock

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2302,10 +2302,10 @@ bluebird@^3.5.5, bluebird@^3.7.1:
23022302
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
23032303
integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
23042304

2305-
bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0:
2306-
version "4.11.9"
2307-
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828"
2308-
integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==
2305+
bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9:
2306+
version "4.12.0"
2307+
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88"
2308+
integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==
23092309

23102310
bn.js@^5.1.1:
23112311
version "5.1.1"
@@ -2390,7 +2390,7 @@ braces@^3.0.1, braces@~3.0.2:
23902390
dependencies:
23912391
fill-range "^7.0.1"
23922392

2393-
brorand@^1.0.1:
2393+
brorand@^1.0.1, brorand@^1.1.0:
23942394
version "1.1.0"
23952395
resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
23962396
integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=
@@ -3805,17 +3805,17 @@ electron-to-chromium@^1.3.378, electron-to-chromium@^1.3.523:
38053805
integrity sha512-YqAL+NXOzjBnpY+dcOKDlZybJDCOzgsq4koW3fvyty/ldTmsb4QazZpOWmVvZ2m0t5jbBf7L0lIGU3BUipwG+A==
38063806

38073807
elliptic@^6.0.0, elliptic@^6.5.2:
3808-
version "6.5.3"
3809-
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6"
3810-
integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==
3808+
version "6.5.4"
3809+
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb"
3810+
integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==
38113811
dependencies:
3812-
bn.js "^4.4.0"
3813-
brorand "^1.0.1"
3812+
bn.js "^4.11.9"
3813+
brorand "^1.1.0"
38143814
hash.js "^1.0.0"
3815-
hmac-drbg "^1.0.0"
3816-
inherits "^2.0.1"
3817-
minimalistic-assert "^1.0.0"
3818-
minimalistic-crypto-utils "^1.0.0"
3815+
hmac-drbg "^1.0.1"
3816+
inherits "^2.0.4"
3817+
minimalistic-assert "^1.0.1"
3818+
minimalistic-crypto-utils "^1.0.1"
38193819

38203820
"emoji-regex@>=6.0.0 <=6.1.1":
38213821
version "6.1.1"
@@ -4806,7 +4806,7 @@ history@^4.9.0:
48064806
tiny-warning "^1.0.0"
48074807
value-equal "^1.0.1"
48084808

4809-
hmac-drbg@^1.0.0:
4809+
hmac-drbg@^1.0.1:
48104810
version "1.0.1"
48114811
resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"
48124812
integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=
@@ -6228,7 +6228,7 @@ minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1:
62286228
resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7"
62296229
integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==
62306230

6231-
minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1:
6231+
minimalistic-crypto-utils@^1.0.1:
62326232
version "1.0.1"
62336233
resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a"
62346234
integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=
@@ -8799,9 +8799,9 @@ sprintf-js@~1.0.2:
87998799
integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
88008800

88018801
ssri@^6.0.1:
8802-
version "6.0.1"
8803-
resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8"
8804-
integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==
8802+
version "6.0.2"
8803+
resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5"
8804+
integrity sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==
88058805
dependencies:
88068806
figgy-pudding "^3.5.1"
88078807

@@ -9957,9 +9957,9 @@ xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1:
99579957
integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==
99589958

99599959
y18n@^4.0.0:
9960-
version "4.0.0"
9961-
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b"
9962-
integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==
9960+
version "4.0.1"
9961+
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4"
9962+
integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==
99639963

99649964
yallist@^3.0.2:
99659965
version "3.1.1"

0 commit comments

Comments
 (0)