Skip to content

Commit d6d2a21

Browse files
committed
Merge remote-tracking branch 'upstream/main' into feat/more-tsx-tabs
2 parents d0ee4ed + e6ef8e4 commit d6d2a21

32 files changed

+542
-345
lines changed

.all-contributorsrc

Lines changed: 147 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,153 @@
13621362
"avatar_url": "https://avatars.githubusercontent.com/u/46557021?v=4",
13631363
"profile": "https://github.com/shemExelate",
13641364
"contributions": [
1365-
"code"
1365+
"code",
1366+
"infra",
1367+
"doc"
1368+
]
1369+
},
1370+
{
1371+
"login": "scoobster17",
1372+
"name": "Phil Gibbins",
1373+
"avatar_url": "https://avatars.githubusercontent.com/u/12157029?v=4",
1374+
"profile": "https://github.com/scoobster17",
1375+
"contributions": [
1376+
"doc"
1377+
]
1378+
},
1379+
{
1380+
"login": "Liadshiran",
1381+
"name": "Liad Shiran",
1382+
"avatar_url": "https://avatars.githubusercontent.com/u/18011106?v=4",
1383+
"profile": "https://github.com/Liadshiran",
1384+
"contributions": [
1385+
"doc"
1386+
]
1387+
},
1388+
{
1389+
"login": "EduardoSimon",
1390+
"name": "Eduardo Simón Picón",
1391+
"avatar_url": "https://avatars.githubusercontent.com/u/19764148?v=4",
1392+
"profile": "https://github.com/EduardoSimon",
1393+
"contributions": [
1394+
"doc"
1395+
]
1396+
},
1397+
{
1398+
"login": "thesanjeevsharma",
1399+
"name": "Sanjeev Sharma",
1400+
"avatar_url": "https://avatars.githubusercontent.com/u/29539278?v=4",
1401+
"profile": "https://thesanjeevsharma.now.sh",
1402+
"contributions": [
1403+
"doc"
1404+
]
1405+
},
1406+
{
1407+
"login": "drorheller",
1408+
"name": "dror-heller",
1409+
"avatar_url": "https://avatars.githubusercontent.com/u/12750737?v=4",
1410+
"profile": "https://github.com/drorheller",
1411+
"contributions": [
1412+
"doc"
1413+
]
1414+
},
1415+
{
1416+
"login": "yialo",
1417+
"name": "Aleksei Arro",
1418+
"avatar_url": "https://avatars.githubusercontent.com/u/38593881?v=4",
1419+
"profile": "https://github.com/yialo",
1420+
"contributions": [
1421+
"doc"
1422+
]
1423+
},
1424+
{
1425+
"login": "carlobeltrame",
1426+
"name": "Carlo Beltrame",
1427+
"avatar_url": "https://avatars.githubusercontent.com/u/7566995?v=4",
1428+
"profile": "https://github.com/carlobeltrame",
1429+
"contributions": [
1430+
"doc"
1431+
]
1432+
},
1433+
{
1434+
"login": "ggorlen",
1435+
"name": "ggorlen",
1436+
"avatar_url": "https://avatars.githubusercontent.com/u/17895165?v=4",
1437+
"profile": "https://github.com/ggorlen",
1438+
"contributions": [
1439+
"doc"
1440+
]
1441+
},
1442+
{
1443+
"login": "mattstobbs",
1444+
"name": "mattstobbs",
1445+
"avatar_url": "https://avatars.githubusercontent.com/u/15341757?v=4",
1446+
"profile": "https://blog.scottlogic.com/mstobbs/",
1447+
"contributions": [
1448+
"doc"
1449+
]
1450+
},
1451+
{
1452+
"login": "vxxce",
1453+
"name": "Zach",
1454+
"avatar_url": "https://avatars.githubusercontent.com/u/38638365?v=4",
1455+
"profile": "https://vxxce.github.io",
1456+
"contributions": [
1457+
"doc"
1458+
]
1459+
},
1460+
{
1461+
"login": "anpaopao",
1462+
"name": "Angus J. Pope",
1463+
"avatar_url": "https://avatars.githubusercontent.com/u/44686792?v=4",
1464+
"profile": "https://github.com/anpaopao",
1465+
"contributions": [
1466+
"doc"
1467+
]
1468+
},
1469+
{
1470+
"login": "DylanPiercey",
1471+
"name": "Dylan Piercey",
1472+
"avatar_url": "https://avatars.githubusercontent.com/u/4985201?v=4",
1473+
"profile": "https://twitter.com/dylan_piercey",
1474+
"contributions": [
1475+
"doc"
1476+
]
1477+
},
1478+
{
1479+
"login": "ruhollahh",
1480+
"name": "Ruhollah",
1481+
"avatar_url": "https://avatars.githubusercontent.com/u/53814636?v=4",
1482+
"profile": "https://github.com/ruhollahh",
1483+
"contributions": [
1484+
"doc"
1485+
]
1486+
},
1487+
{
1488+
"login": "votemike",
1489+
"name": "Michael Gwynne",
1490+
"avatar_url": "https://avatars.githubusercontent.com/u/3957065?v=4",
1491+
"profile": "https://votemike.co.uk",
1492+
"contributions": [
1493+
"doc"
1494+
]
1495+
},
1496+
{
1497+
"login": "thetric",
1498+
"name": "Dominik Broj",
1499+
"avatar_url": "https://avatars.githubusercontent.com/u/19861998?v=4",
1500+
"profile": "https://github.com/thetric",
1501+
"contributions": [
1502+
"doc"
1503+
]
1504+
},
1505+
{
1506+
"login": "stephenwade",
1507+
"name": "Stephen Wade",
1508+
"avatar_url": "https://avatars.githubusercontent.com/u/4148577?v=4",
1509+
"profile": "https://github.com/stephenwade",
1510+
"contributions": [
1511+
"doc"
13661512
]
13671513
}
13681514
],

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Documentation site for [React Testing Library](https://github.com/testing-librar
2222
[opencollective-badge]: https://img.shields.io/opencollective/all/testing-library.svg?label=opencollective%20backers&style=flat-square
2323
[allcontributors-badge]: https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square
2424
[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square
25-
[coc]: https://github.com/testing-library/react-testing-library/blob/master/CODE_OF_CONDUCT.md
25+
[coc]: https://github.com/testing-library/react-testing-library/blob/main/CODE_OF_CONDUCT.md
2626

2727
This website was created with [Docusaurus](https://v2.docusaurus.io).
2828

@@ -324,7 +324,27 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
324324
<tr>
325325
<td align="center"><a href="https://naruth.dev"><img src="https://avatars.githubusercontent.com/u/9120451?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Naruth Kongurai</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=naruthk" title="Documentation">📖</a></td>
326326
<td align="center"><a href="https://github.com/ErfanMirzapour"><img src="https://avatars.githubusercontent.com/u/52346515?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Erfan Mirzapour</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=ErfanMirzapour" title="Documentation">📖</a></td>
327-
<td align="center"><a href="https://github.com/shemExelate"><img src="https://avatars.githubusercontent.com/u/46557021?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Shem Mahluf</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=shemExelate" title="Code">💻</a></td>
327+
<td align="center"><a href="https://github.com/shemExelate"><img src="https://avatars.githubusercontent.com/u/46557021?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Shem Mahluf</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=shemExelate" title="Code">💻</a> <a href="#infra-shemExelate" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/testing-library/testing-library-docs/commits?author=shemExelate" title="Documentation">📖</a></td>
328+
<td align="center"><a href="https://github.com/scoobster17"><img src="https://avatars.githubusercontent.com/u/12157029?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Phil Gibbins</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=scoobster17" title="Documentation">📖</a></td>
329+
<td align="center"><a href="https://github.com/Liadshiran"><img src="https://avatars.githubusercontent.com/u/18011106?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Liad Shiran</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=Liadshiran" title="Documentation">📖</a></td>
330+
<td align="center"><a href="https://github.com/EduardoSimon"><img src="https://avatars.githubusercontent.com/u/19764148?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Eduardo Simón Picón</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=EduardoSimon" title="Documentation">📖</a></td>
331+
<td align="center"><a href="https://thesanjeevsharma.now.sh"><img src="https://avatars.githubusercontent.com/u/29539278?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sanjeev Sharma</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=thesanjeevsharma" title="Documentation">📖</a></td>
332+
</tr>
333+
<tr>
334+
<td align="center"><a href="https://github.com/drorheller"><img src="https://avatars.githubusercontent.com/u/12750737?v=4?s=100" width="100px;" alt=""/><br /><sub><b>dror-heller</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=drorheller" title="Documentation">📖</a></td>
335+
<td align="center"><a href="https://github.com/yialo"><img src="https://avatars.githubusercontent.com/u/38593881?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aleksei Arro</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=yialo" title="Documentation">📖</a></td>
336+
<td align="center"><a href="https://github.com/carlobeltrame"><img src="https://avatars.githubusercontent.com/u/7566995?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Carlo Beltrame</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=carlobeltrame" title="Documentation">📖</a></td>
337+
<td align="center"><a href="https://github.com/ggorlen"><img src="https://avatars.githubusercontent.com/u/17895165?v=4?s=100" width="100px;" alt=""/><br /><sub><b>ggorlen</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=ggorlen" title="Documentation">📖</a></td>
338+
<td align="center"><a href="https://blog.scottlogic.com/mstobbs/"><img src="https://avatars.githubusercontent.com/u/15341757?v=4?s=100" width="100px;" alt=""/><br /><sub><b>mattstobbs</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=mattstobbs" title="Documentation">📖</a></td>
339+
<td align="center"><a href="https://vxxce.github.io"><img src="https://avatars.githubusercontent.com/u/38638365?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Zach</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=vxxce" title="Documentation">📖</a></td>
340+
<td align="center"><a href="https://github.com/anpaopao"><img src="https://avatars.githubusercontent.com/u/44686792?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Angus J. Pope</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=anpaopao" title="Documentation">📖</a></td>
341+
</tr>
342+
<tr>
343+
<td align="center"><a href="https://twitter.com/dylan_piercey"><img src="https://avatars.githubusercontent.com/u/4985201?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dylan Piercey</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=DylanPiercey" title="Documentation">📖</a></td>
344+
<td align="center"><a href="https://github.com/ruhollahh"><img src="https://avatars.githubusercontent.com/u/53814636?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ruhollah</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=ruhollahh" title="Documentation">📖</a></td>
345+
<td align="center"><a href="https://votemike.co.uk"><img src="https://avatars.githubusercontent.com/u/3957065?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Michael Gwynne</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=votemike" title="Documentation">📖</a></td>
346+
<td align="center"><a href="https://github.com/thetric"><img src="https://avatars.githubusercontent.com/u/19861998?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dominik Broj</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=thetric" title="Documentation">📖</a></td>
347+
<td align="center"><a href="https://github.com/stephenwade"><img src="https://avatars.githubusercontent.com/u/4148577?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stephen Wade</b></sub></a><br /><a href="https://github.com/testing-library/testing-library-docs/commits?author=stephenwade" title="Documentation">📖</a></td>
328348
</tr>
329349
</table>
330350

blog/2019-04-25-new-org.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
22
# prettier doesn't like how long this line is.: ""
33
# prettier-ignore: ""
4-
title: "Testing Library Updates: new release, github org, open collective, and twitter account"
4+
title:
5+
'Testing Library Updates: new release, github org, open collective, and
6+
twitter account'
57
author: Kent C. Dodds
6-
authorURL: "https://kentcdodds.com"
7-
authorImageURL: "https://avatars0.githubusercontent.com/u/1500684?s=120&v=4"
8+
authorURL: 'https://kentcdodds.com'
9+
authorImageURL: 'https://avatars0.githubusercontent.com/u/1500684?s=120&v=4'
810
---
911

1012
Hello friends! I'm pleased to announce the recent updates to the testing-library
@@ -147,7 +149,7 @@ and more gets added to it daily. If you know of blog posts, YouTube videos,
147149
courses, or anything else about the Testing Library family of tools, please
148150
contribute to the list!
149151

150-
> [Contribute to the learning materials page](https://github.com/testing-library/testing-library-docs/edit/master/docs/learning.mdx)
152+
> [Contribute to the learning materials page](https://github.com/testing-library/testing-library-docs/edit/main/docs/learning.mdx)
151153
152154
## Other Exciting news
153155

docs/angular-testing-library/api.mdx

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ await render(AppComponent, {
5353

5454
### `componentProviders`
5555

56-
A collection of providers to inject dependencies of the component.
56+
A collection of providers needed to render the component via Dependency
57+
Injection.
58+
59+
These will be provided at the component level. To inject dependencies at the
60+
module level, use [`providers`](#providers).
5761

5862
For more info see the
5963
[Angular docs](https://angular.io/api/core/Directive#providers).
@@ -70,25 +74,19 @@ await render(AppComponent, {
7074

7175
### `declarations`
7276

73-
A collection of providers needed to render the component via Dependency
74-
Injection, for example, injectable services or tokens.
77+
A collection of components, directives and pipes needed to render the component.
78+
For example, nested components of the component.
7579

7680
For more info see the
77-
[Angular docs](https://angular.io/api/core/NgModule#providers).
81+
[Angular docs](https://angular.io/api/core/NgModule#declarations).
7882

7983
**default** : `[]`
8084

8185
**example**:
8286

8387
```typescript
8488
await render(AppComponent, {
85-
providers: [
86-
CustomersService,
87-
{
88-
provide: MAX_CUSTOMERS_TOKEN,
89-
useValue: 10,
90-
},
91-
],
89+
declarations: [CustomerDetailComponent, ButtonComponent],
9290
})
9391
```
9492

@@ -139,6 +137,33 @@ await render(AppComponent, {
139137
})
140138
```
141139

140+
### `providers`
141+
142+
A collection of providers needed to render the component via Dependency
143+
Injection.
144+
145+
These will be provided at the module level. To inject dependencies at the
146+
component level, use [`componentProviders`](#componentProviders).
147+
148+
For more info see the
149+
[Angular docs](https://angular.io/api/core/NgModule#providers).
150+
151+
**default** : `[]`
152+
153+
**example**:
154+
155+
```typescript
156+
await render(AppComponent, {
157+
providers: [
158+
CustomersService,
159+
{
160+
provide: MAX_CUSTOMERS_TOKEN,
161+
useValue: 10,
162+
},
163+
],
164+
})
165+
```
166+
142167
### `queries`
143168

144169
Queries to bind. Overrides the default set from DOM Testing Library unless
@@ -271,7 +296,9 @@ Re-render the same component with different props. Will call `detectChanges`
271296
after props has been updated.
272297

273298
```typescript
274-
const { rerender } = await render(Counter, { componentProperties: { count: 4 } })
299+
const { rerender } = await render(Counter, {
300+
componentProperties: { count: 4 },
301+
})
275302
276303
expect(screen.getByTestId('count-value').textContent).toBe('4')
277304
@@ -284,7 +311,8 @@ expect(screen.getByTestId('count-value').textContent).toBe('7')
284311

285312
Trigger a change detection cycle for the component.
286313

287-
For more info see the [Angular docs](https://angular.io/api/core/testing/ComponentFixture#detectChanges).
314+
For more info see the
315+
[Angular docs](https://angular.io/api/core/testing/ComponentFixture#detectChanges).
288316

289317
### `debugElement`
290318

@@ -337,7 +365,7 @@ for a complete list.
337365
**example**:
338366

339367
```typescript
340-
const { getByText, queryByLabelText} = await render(AppComponent)
368+
const { getByText, queryByLabelText } = await render(AppComponent)
341369
342370
getByText('Hello world')
343371
queryByLabelText('First name:')

0 commit comments

Comments
 (0)