Skip to content

Commit 073e99c

Browse files
authored
Merge branch 'master' into fix-pretty-format-import
2 parents 696d8ab + d10a13d commit 073e99c

File tree

9 files changed

+159
-72
lines changed

9 files changed

+159
-72
lines changed

.all-contributorsrc

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,8 @@
576576
"profile": "https://github.com/weyert",
577577
"contributions": [
578578
"ideas",
579-
"review"
579+
"review",
580+
"design"
580581
]
581582
},
582583
{
@@ -1102,6 +1103,24 @@
11021103
"contributions": [
11031104
"doc"
11041105
]
1106+
},
1107+
{
1108+
"login": "michael-siek",
1109+
"name": "Michael",
1110+
"avatar_url": "https://avatars0.githubusercontent.com/u/45568605?v=4",
1111+
"profile": "http://michaelsiek.com",
1112+
"contributions": [
1113+
"doc"
1114+
]
1115+
},
1116+
{
1117+
"login": "2dubbing",
1118+
"name": "Braden Lee",
1119+
"avatar_url": "https://avatars2.githubusercontent.com/u/15885679?v=4",
1120+
"profile": "http://2dubbing.tistory.com",
1121+
"contributions": [
1122+
"doc"
1123+
]
11051124
}
11061125
],
11071126
"contributorsPerLine": 7,

.github/ISSUE_TEMPLATE.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ Thanks for your interest in the project. We appreciate bugs filed and PRs submit
2222
For questions related to using the library, please visit a support community
2323
instead of filing an issue on GitHub. You can follow the instructions in this
2424
codesandbox to make a reproduction of your issue: https://kcd.im/rtl-help
25-
* React Spectrum
26-
https://spectrum.chat/testing-library
27-
* Reactiflux on Discord
28-
https://www.reactiflux.com
25+
* Discord
26+
https://discord.gg/c6JN9fM
2927
* Stack Overflow
3028
https://stackoverflow.com/questions/tagged/react-testing-library
3129

.github/ISSUE_TEMPLATE/Question.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ For questions related to using the library, please visit a support community
1616
instead of filing an issue on GitHub. You can follow the instructions in this
1717
codesandbox to make a reproduction of your issue: https://kcd.im/rtl-help
1818

19-
- React Spectrum https://spectrum.chat/react-testing-library
20-
- Reactiflux on Discord https://www.reactiflux.com
19+
- Discord https://discord.gg/c6JN9fM
2120
- Stack Overflow
2221
https://stackoverflow.com/questions/tagged/react-testing-library
2322
- Documentation: https://github.com/testing-library/testing-library-docs

CODE_OF_CONDUCT.md

Lines changed: 98 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,74 +2,127 @@
22

33
## Our Pledge
44

5-
In the interest of fostering an open and welcoming environment, we as
6-
contributors and maintainers pledge to making participation in our project and
7-
our community a harassment-free experience for everyone, regardless of age, body
8-
size, disability, ethnicity, gender identity and expression, level of
9-
experience, nationality, personal appearance, race, religion, or sexual identity
10-
and orientation.
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
1114

1215
## Our Standards
1316

14-
Examples of behavior that contributes to creating a positive environment
15-
include:
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
1619

17-
- Using welcoming and inclusive language
18-
- Being respectful of differing viewpoints and experiences
19-
- Gracefully accepting constructive criticism
20-
- Focusing on what is best for the community
21-
- Showing empathy towards other community members
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
- Focusing on what is best not just for us as individuals, but for the overall
26+
community
2227

23-
Examples of unacceptable behavior by participants include:
28+
Examples of unacceptable behavior include:
2429

25-
- The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
27-
- Trolling, insulting/derogatory comments, and personal or political attacks
30+
- The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
2833
- Public or private harassment
29-
- Publishing others' private information, such as a physical or electronic
30-
address, without explicit permission
34+
- Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
3136
- Other conduct which could reasonably be considered inappropriate in a
3237
professional setting
3338

34-
## Our Responsibilities
39+
## Enforcement Responsibilities
3540

36-
Project maintainers are responsible for clarifying the standards of acceptable
37-
behavior and are expected to take appropriate and fair corrective action in
38-
response to any instances of unacceptable behavior.
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
3945

40-
Project maintainers have the right and responsibility to remove, edit, or reject
46+
Community leaders have the right and responsibility to remove, edit, or reject
4147
comments, commits, code, wiki edits, issues, and other contributions that are
42-
not aligned to this Code of Conduct, or to ban temporarily or permanently any
43-
contributor for other behaviors that they deem inappropriate, threatening,
44-
offensive, or harmful.
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
4550

4651
## Scope
4752

48-
This Code of Conduct applies both within project spaces and in public spaces
49-
when an individual is representing the project or its community. Examples of
50-
representing a project or community include using an official project e-mail
51-
address, posting via an official social media account, or acting as an appointed
52-
representative at an online or offline event. Representation of a project may be
53-
further defined and clarified by project maintainers.
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
5458

5559
## Enforcement
5660

5761
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at [email protected]. All
59-
complaints will be reviewed and investigated and will result in a response that
60-
is deemed necessary and appropriate to the circumstances. The project team is
61-
obligated to maintain confidentiality with regard to the reporter of an
62-
incident. Further details of specific enforcement policies may be posted
63-
separately.
62+
reported to the community leaders responsible for enforcement at
63+
[email protected]. All complaints will be reviewed and investigated promptly
64+
and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series of
86+
actions.
6487

65-
Project maintainers who do not follow or enforce the Code of Conduct in good
66-
faith may face temporary or permanent repercussions as determined by other
67-
members of the project's leadership.
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or permanent
93+
ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within the
113+
community.
68114

69115
## Attribution
70116

71117
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
72-
version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by
122+
[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
73125

74-
[homepage]: http://contributor-covenant.org
75-
[version]: http://contributor-covenant.org/version/1/4/
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

README.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ practices.</p>
3131

3232
[![All Contributors](https://img.shields.io/badge/all_contributors-102-orange.svg?style=flat-square)](#contributors)
3333
[![PRs Welcome][prs-badge]][prs] [![Code of Conduct][coc-badge]][coc]
34-
[![Join the community on Spectrum][spectrum-badge]][spectrum]
34+
[![Discord][discord-badge]][discord]
3535

3636
[![Watch on GitHub][github-watch-badge]][github-watch]
3737
[![Star on GitHub][github-star-badge]][github-star]
@@ -101,9 +101,11 @@ should be installed as one of your project's `devDependencies`:
101101
```
102102
npm install --save-dev @testing-library/react
103103
```
104+
104105
or
105106

106107
for installation via [yarn](https://classic.yarnpkg.com/en/)
108+
107109
```
108110
yarn add --dev @testing-library/react
109111
```
@@ -173,7 +175,9 @@ function HiddenMessage({children}) {
173175
}
174176

175177
export default HiddenMessage
178+
```
176179

180+
```jsx
177181
// __tests__/hidden-message.js
178182
// these imports are something you'd normally configure Jest to import for you
179183
// automatically. Learn more in the setup docs: https://testing-library.com/docs/react-testing-library/setup#cleanup
@@ -281,11 +285,14 @@ import Login from '../login'
281285
const server = setupServer(
282286
rest.post('/api/login', (req, res, ctx) => {
283287
return res(ctx.json({token: 'fake_user_token'}))
284-
})
288+
}),
285289
)
286290

287291
beforeAll(() => server.listen())
288-
afterEach(() => server.resetHandlers())
292+
afterEach(() => {
293+
server.resetHandlers()
294+
window.localStorage.removeItem('token')
295+
})
289296
afterAll(() => server.close())
290297

291298
test('allows the user to login successfully', async () => {
@@ -316,11 +323,8 @@ test('handles server exceptions', async () => {
316323
// mock the server error response for this test suite only.
317324
server.use(
318325
rest.post('/', (req, res, ctx) => {
319-
return res(
320-
ctx.status(500),
321-
ctx.json({message: 'Internal server error'}),
322-
)
323-
})
326+
return res(ctx.status(500), ctx.json({message: 'Internal server error'}))
327+
}),
324328
)
325329

326330
render(<Login />)
@@ -424,8 +428,7 @@ a 👍. This helps maintainers prioritize what to work on.
424428
For questions related to using the library, please visit a support community
425429
instead of filing an issue on GitHub.
426430
427-
- [Spectrum][spectrum]
428-
- [Reactiflux on Discord][reactiflux]
431+
- [Discord][discord]
429432
- [Stack Overflow][stackoverflow]
430433
431434
## Contributors
@@ -511,7 +514,7 @@ Thanks goes to these people ([emoji key][emojis]):
511514
<tr>
512515
<td align="center"><a href="http://www.aboutmonica.com"><img src="https://avatars0.githubusercontent.com/u/6998954?v=4" width="100px;" alt=""/><br /><sub><b>Monica Powell</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=M0nica" title="Documentation">📖</a></td>
513516
<td align="center"><a href="http://sivkoff.com"><img src="https://avatars1.githubusercontent.com/u/2699953?v=4" width="100px;" alt=""/><br /><sub><b>Vitaly Sivkov</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=sivkoff" title="Code">💻</a></td>
514-
<td align="center"><a href="https://github.com/weyert"><img src="https://avatars3.githubusercontent.com/u/7049?v=4" width="100px;" alt=""/><br /><sub><b>Weyert de Boer</b></sub></a><br /><a href="#ideas-weyert" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/testing-library/react-testing-library/pulls?q=is%3Apr+reviewed-by%3Aweyert" title="Reviewed Pull Requests">👀</a></td>
517+
<td align="center"><a href="https://github.com/weyert"><img src="https://avatars3.githubusercontent.com/u/7049?v=4" width="100px;" alt=""/><br /><sub><b>Weyert de Boer</b></sub></a><br /><a href="#ideas-weyert" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/testing-library/react-testing-library/pulls?q=is%3Apr+reviewed-by%3Aweyert" title="Reviewed Pull Requests">👀</a> <a href="#design-weyert" title="Design">🎨</a></td>
515518
<td align="center"><a href="https://github.com/EstebanMarin"><img src="https://avatars3.githubusercontent.com/u/13613037?v=4" width="100px;" alt=""/><br /><sub><b>EstebanMarin</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=EstebanMarin" title="Documentation">📖</a></td>
516519
<td align="center"><a href="https://github.com/vctormb"><img src="https://avatars2.githubusercontent.com/u/13953703?v=4" width="100px;" alt=""/><br /><sub><b>Victor Martins</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=vctormb" title="Documentation">📖</a></td>
517520
<td align="center"><a href="https://github.com/RoystonS"><img src="https://avatars0.githubusercontent.com/u/19773?v=4" width="100px;" alt=""/><br /><sub><b>Royston Shufflebotham</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3ARoystonS" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=RoystonS" title="Documentation">📖</a> <a href="#example-RoystonS" title="Examples">💡</a></td>
@@ -583,6 +586,8 @@ Thanks goes to these people ([emoji key][emojis]):
583586
<tr>
584587
<td align="center"><a href="https://github.com/NiGhTTraX"><img src="https://avatars0.githubusercontent.com/u/485061?v=4" width="100px;" alt=""/><br /><sub><b>Andrei Picus</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3ANiGhTTraX" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/react-testing-library/pulls?q=is%3Apr+reviewed-by%3ANiGhTTraX" title="Reviewed Pull Requests">👀</a></td>
585588
<td align="center"><a href="https://redd.one"><img src="https://avatars3.githubusercontent.com/u/14984911?v=4" width="100px;" alt=""/><br /><sub><b>Artem Zakharchenko</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=kettanaito" title="Documentation">📖</a></td>
589+
<td align="center"><a href="http://michaelsiek.com"><img src="https://avatars0.githubusercontent.com/u/45568605?v=4" width="100px;" alt=""/><br /><sub><b>Michael</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=michael-siek" title="Documentation">📖</a></td>
590+
<td align="center"><a href="http://2dubbing.tistory.com"><img src="https://avatars2.githubusercontent.com/u/15885679?v=4" width="100px;" alt=""/><br /><sub><b>Braden Lee</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=2dubbing" title="Documentation">📖</a></td>
586591
</tr>
587592
</table>
588593
@@ -609,8 +614,6 @@ Contributions of any kind welcome!
609614
[package]: https://www.npmjs.com/package/@testing-library/react
610615
[downloads-badge]: https://img.shields.io/npm/dm/@testing-library/react.svg?style=flat-square
611616
[npmtrends]: http://www.npmtrends.com/@testing-library/react
612-
[spectrum-badge]: https://withspectrum.github.io/badge/badge.svg
613-
[spectrum]: https://spectrum.chat/testing-library
614617
[license-badge]: https://img.shields.io/npm/l/@testing-library/react.svg?style=flat-square
615618
[license]: https://github.com/testing-library/react-testing-library/blob/master/LICENSE
616619
[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
@@ -629,7 +632,8 @@ Contributions of any kind welcome!
629632
[bugs]: https://github.com/testing-library/react-testing-library/issues?q=is%3Aissue+is%3Aopen+label%3Abug+sort%3Acreated-desc
630633
[requests]: https://github.com/testing-library/react-testing-library/issues?q=is%3Aissue+sort%3Areactions-%2B1-desc+label%3Aenhancement+is%3Aopen
631634
[good-first-issue]: https://github.com/testing-library/react-testing-library/issues?utf8=✓&q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3A"good+first+issue"+
632-
[reactiflux]: https://www.reactiflux.com/
635+
[discord-badge]: https://img.shields.io/discord/723559267868737556.svg?color=7389D8&labelColor=6A7EC2&logo=discord&logoColor=ffffff&style=flat-square
636+
[discord]: https://discord.gg/c6JN9fM
633637
[stackoverflow]: https://stackoverflow.com/questions/tagged/react-testing-library
634638
[react-hooks-testing-library]: https://github.com/testing-library/react-hooks-testing-library
635639

other/cheat-sheet.pdf

-7.32 KB
Binary file not shown.

other/design files/README.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Cheat sheet design
2+
3+
The cheat sheet document has been created using the desktop publishing software called Affinity Publisher, the original source file can be found in this folder
4+
5+
## Fonts used
6+
7+
- Menlo
8+
- Arial
9+
10+
## Standard distances
11+
12+
15pt between boxes
13+
8pt margin from box edge to inner text

other/design files/cheat-sheet.afpub

155 KB
Binary file not shown.

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,22 @@
4343
"author": "Kent C. Dodds <[email protected]> (https://kentcdodds.com)",
4444
"license": "MIT",
4545
"dependencies": {
46-
"@babel/runtime": "^7.10.2",
47-
"@testing-library/dom": "^7.9.0",
46+
"@babel/runtime": "^7.10.3",
47+
"@testing-library/dom": "^7.17.0",
4848
"pretty-format": "^25.5.0"
4949
},
5050
"devDependencies": {
5151
"@reach/router": "^1.3.3",
52-
"@testing-library/jest-dom": "^5.9.0",
52+
"@testing-library/jest-dom": "^5.10.1",
5353
"@types/react-dom": "^16.9.8",
5454
"dotenv-cli": "^3.1.0",
55-
"dtslint": "3.6.9",
56-
"kcd-scripts": "^6.2.0",
55+
"dtslint": "3.6.12",
56+
"kcd-scripts": "^6.2.3",
5757
"npm-run-all": "^4.1.5",
5858
"react": "^16.13.1",
5959
"react-dom": "^16.13.1",
60-
"rimraf": "^3.0.2"
60+
"rimraf": "^3.0.2",
61+
"typescript": "^3.9.5"
6162
},
6263
"peerDependencies": {
6364
"react": "*",

0 commit comments

Comments
 (0)