Skip to content

Commit af885f8

Browse files
author
Kent C. Dodds
committed
chore: format all the things
1 parent 59ab46d commit af885f8

8 files changed

+126
-91
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ merge of your pull request!
3636

3737
- [ ] Documentation
3838
- [ ] Tests
39-
- [ ] Ready to be merged <!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->
39+
- [ ] Ready to be merged
40+
<!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->
4041

4142
<!-- feel free to add additional comments -->

.prettierrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
"singleQuote": true,
77
"trailingComma": "all",
88
"bracketSpacing": false,
9-
"jsxBracketSameLine": false
9+
"jsxBracketSameLine": false,
10+
"proseWrap": "always"
1011
}

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# CHANGELOG
22

3-
The changelog is automatically updated using [semantic-release](https://github.com/semantic-release/semantic-release).
4-
You can see it on the [releases page](../../releases).
3+
The changelog is automatically updated using
4+
[semantic-release](https://github.com/semantic-release/semantic-release). You
5+
can see it on the [releases page](../../releases).

CONTRIBUTING.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
Thanks for being willing to contribute!
44

5-
**Working on your first Pull Request?** You can learn how from this _free_ series
6-
[How to Contribute to an Open Source Project on GitHub][egghead]
5+
**Working on your first Pull Request?** You can learn how from this _free_
6+
series [How to Contribute to an Open Source Project on GitHub][egghead]
77

88
## Project setup
99

@@ -20,18 +20,17 @@ Thanks for being willing to contribute!
2020
> git branch --set-upstream-to=upstream/master master
2121
> ```
2222
>
23-
> This will add the original repository as a "remote" called "upstream,"
24-
> Then fetch the git information from that remote, then set your local `master`
25-
> branch to use the upstream master branch whenever you run `git pull`.
26-
> Then you can make all of your pull request branches based on this `master`
27-
> branch. Whenever you want to update your version of `master`, do a regular
28-
> `git pull`.
23+
> This will add the original repository as a "remote" called "upstream," Then
24+
> fetch the git information from that remote, then set your local `master`
25+
> branch to use the upstream master branch whenever you run `git pull`. Then you
26+
> can make all of your pull request branches based on this `master` branch.
27+
> Whenever you want to update your version of `master`, do a regular `git pull`.
2928
3029
## Committing and Pushing changes
3130
3231
Please make sure to run the tests before you commit your changes. You can run
33-
`npm run test:update` which will update any snapshots that need updating.
34-
Make sure to include those changes (if they exist) in your commit.
32+
`npm run test:update` which will update any snapshots that need updating. Make
33+
sure to include those changes (if they exist) in your commit.
3534
3635
### opt into git hooks
3736
@@ -52,5 +51,6 @@ Please checkout the [the open issues][issues]
5251
Also, please watch the repo and respond to questions/bug reports/feature
5352
requests! Thanks!
5453
55-
[egghead]: https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github
54+
[egghead]:
55+
https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github
5656
[issues]: https://github.com/kentcdodds/cypress-testing-library/issues

README.md

Lines changed: 48 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,20 @@
77

88
<p>Simple and complete custom Cypress commands and utilities that encourage good testing practices.</p>
99

10-
[**Read the docs**](https://testing-library.com/cypress) | [Edit the docs](https://github.com/alexkrolick/testing-library-docs)
10+
[**Read the docs**](https://testing-library.com/cypress) |
11+
[Edit the docs](https://github.com/alexkrolick/testing-library-docs)
1112

1213
</div>
1314

1415
<hr />
1516

1617
[![Build Status][build-badge]][build]
1718
[![Code Coverage][coverage-badge]][coverage]
18-
[![version][version-badge]][package]
19-
[![downloads][downloads-badge]][npmtrends]
19+
[![version][version-badge]][package] [![downloads][downloads-badge]][npmtrends]
2020
[![MIT License][license-badge]][license]
2121

2222
[![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors)
23-
[![PRs Welcome][prs-badge]][prs]
24-
[![Code of Conduct][coc-badge]][coc]
23+
[![PRs Welcome][prs-badge]][prs] [![Code of Conduct][coc-badge]][coc]
2524

2625
[![Watch on GitHub][github-watch-badge]][github-watch]
2726
[![Star on GitHub][github-star-badge]][github-star]
@@ -35,11 +34,13 @@
3534

3635
## The problem
3736

38-
You want to use [`dom-testing-library`][dom-testing-library] methods in your [Cypress][cypress] tests.
37+
You want to use [`dom-testing-library`][dom-testing-library] methods in your
38+
[Cypress][cypress] tests.
3939

4040
## This solution
4141

42-
This allows you to use all the useful [`dom-testing-library`][dom-testing-library] methods in your tests.
42+
This allows you to use all the useful
43+
[`dom-testing-library`][dom-testing-library] methods in your tests.
4344

4445
## Table of Contents
4546

@@ -66,7 +67,8 @@ npm install --save-dev cypress-testing-library
6667

6768
### With typescript
6869

69-
Typings are defined under `cypress-testing-library/typings`, and should be added as follows in `tsconfig.json`:
70+
Typings are defined under `cypress-testing-library/typings`, and should be added
71+
as follows in `tsconfig.json`:
7072

7173
```json
7274
{
@@ -86,9 +88,12 @@ Add this line to your project's `cypress/support/commands.js`:
8688
import 'cypress-testing-library/add-commands';
8789
```
8890

89-
You can now use all of `dom-testing-library`'s `getBy`, `getAllBy`, `queryBy` and `queryAllBy` commands. [See `dom-testing-library` repo for reference](https://github.com/kentcdodds/dom-testing-library#usage)
91+
You can now use all of `dom-testing-library`'s `getBy`, `getAllBy`, `queryBy`
92+
and `queryAllBy` commands.
93+
[See `dom-testing-library` repo for reference](https://github.com/kentcdodds/dom-testing-library#usage)
9094

91-
To show some simple examples (from [cypress/integration/commands.spec.js](cypress/integration/commands.spec.js)):
95+
To show some simple examples (from
96+
[cypress/integration/commands.spec.js](cypress/integration/commands.spec.js)):
9297

9398
```javascript
9499
cy.getAllByText('Jackie Chan').click()
@@ -103,7 +108,11 @@ cy.get('form').then(subject => {
103108
})
104109
```
105110

106-
`cypress-testing-library` supports both jQuery elements and DOM nodes. This is necessary because Cypress uses jQuery elements, while `dom-testing-library` expects DOM nodes. When you pass a jQuery element as `container`, it will get the first DOM node from the collection and use that as the `container` parameter for the `dom-testing-library` functions.
111+
`cypress-testing-library` supports both jQuery elements and DOM nodes. This is
112+
necessary because Cypress uses jQuery elements, while `dom-testing-library`
113+
expects DOM nodes. When you pass a jQuery element as `container`, it will get
114+
the first DOM node from the collection and use that as the `container` parameter
115+
for the `dom-testing-library` functions.
107116

108117
## Other Solutions
109118

@@ -131,27 +140,41 @@ MIT
131140

132141
[npm]: https://www.npmjs.com/
133142
[node]: https://nodejs.org
134-
[build-badge]: https://img.shields.io/travis/kentcdodds/cypress-testing-library.svg?style=flat-square
143+
[build-badge]:
144+
https://img.shields.io/travis/kentcdodds/cypress-testing-library.svg?style=flat-square
135145
[build]: https://travis-ci.org/kentcdodds/cypress-testing-library
136-
[coverage-badge]: https://img.shields.io/codecov/c/github/kentcdodds/cypress-testing-library.svg?style=flat-square
146+
[coverage-badge]:
147+
https://img.shields.io/codecov/c/github/kentcdodds/cypress-testing-library.svg?style=flat-square
137148
[coverage]: https://codecov.io/github/kentcdodds/cypress-testing-library
138-
[version-badge]: https://img.shields.io/npm/v/cypress-testing-library.svg?style=flat-square
149+
[version-badge]:
150+
https://img.shields.io/npm/v/cypress-testing-library.svg?style=flat-square
139151
[package]: https://www.npmjs.com/package/cypress-testing-library
140-
[downloads-badge]: https://img.shields.io/npm/dm/cypress-testing-library.svg?style=flat-square
152+
[downloads-badge]:
153+
https://img.shields.io/npm/dm/cypress-testing-library.svg?style=flat-square
141154
[npmtrends]: http://www.npmtrends.com/cypress-testing-library
142-
[license-badge]: https://img.shields.io/npm/l/cypress-testing-library.svg?style=flat-square
143-
[license]: https://github.com/kentcdodds/cypress-testing-library/blob/master/LICENSE
144-
[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
155+
[license-badge]:
156+
https://img.shields.io/npm/l/cypress-testing-library.svg?style=flat-square
157+
[license]:
158+
https://github.com/kentcdodds/cypress-testing-library/blob/master/LICENSE
159+
[prs-badge]:
160+
https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
145161
[prs]: http://makeapullrequest.com
146-
[donate-badge]: https://img.shields.io/badge/$-support-green.svg?style=flat-square
147-
[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square
148-
[coc]: https://github.com/kentcdodds/cypress-testing-library/blob/master/other/CODE_OF_CONDUCT.md
149-
[github-watch-badge]: https://img.shields.io/github/watchers/kentcdodds/cypress-testing-library.svg?style=social
162+
[donate-badge]:
163+
https://img.shields.io/badge/$-support-green.svg?style=flat-square
164+
[coc-badge]:
165+
https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square
166+
[coc]:
167+
https://github.com/kentcdodds/cypress-testing-library/blob/master/other/CODE_OF_CONDUCT.md
168+
[github-watch-badge]:
169+
https://img.shields.io/github/watchers/kentcdodds/cypress-testing-library.svg?style=social
150170
[github-watch]: https://github.com/kentcdodds/cypress-testing-library/watchers
151-
[github-star-badge]: https://img.shields.io/github/stars/kentcdodds/cypress-testing-library.svg?style=social
171+
[github-star-badge]:
172+
https://img.shields.io/github/stars/kentcdodds/cypress-testing-library.svg?style=social
152173
[github-star]: https://github.com/kentcdodds/cypress-testing-library/stargazers
153-
[twitter]: https://twitter.com/intent/tweet?text=Check%20out%20cypress-testing-library%20by%20%40kentcdodds%20https%3A%2F%2Fgithub.com%2Fkentcdodds%2Fcypress-testing-library%20%F0%9F%91%8D
154-
[twitter-badge]: https://img.shields.io/twitter/url/https/github.com/kentcdodds/cypress-testing-library.svg?style=social
174+
[twitter]:
175+
https://twitter.com/intent/tweet?text=Check%20out%20cypress-testing-library%20by%20%40kentcdodds%20https%3A%2F%2Fgithub.com%2Fkentcdodds%2Fcypress-testing-library%20%F0%9F%91%8D
176+
[twitter-badge]:
177+
https://img.shields.io/twitter/url/https/github.com/kentcdodds/cypress-testing-library.svg?style=social
155178
[emojis]: https://github.com/kentcdodds/all-contributors#emoji-key
156179
[all-contributors]: https://github.com/kentcdodds/all-contributors
157180
[dom-testing-library]: https://github.com/kentcdodds/dom-testing-library

other/CODE_OF_CONDUCT.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
In the interest of fostering an open and welcoming environment, we as
66
contributors and maintainers pledge to making participation in our project and
77
our community a harassment-free experience for everyone, regardless of age, body
8-
size, disability, ethnicity, gender identity and expression, level of experience,
9-
nationality, personal appearance, race, religion, or sexual identity and
10-
orientation.
8+
size, disability, ethnicity, gender identity and expression, level of
9+
experience, nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
1111

1212
## Our Standards
1313

@@ -37,11 +37,11 @@ Project maintainers are responsible for clarifying the standards of acceptable
3737
behavior and are expected to take appropriate and fair corrective action in
3838
response to any instances of unacceptable behavior.
3939

40-
Project maintainers have the right and responsibility to remove, edit, or
41-
reject comments, commits, code, wiki edits, issues, and other contributions
42-
that are not aligned to this Code of Conduct, or to ban temporarily or
43-
permanently any contributor for other behaviors that they deem inappropriate,
44-
threatening, offensive, or harmful.
40+
Project maintainers have the right and responsibility to remove, edit, or reject
41+
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.
4545

4646
## Scope
4747

@@ -58,17 +58,18 @@ Instances of abusive, harassing, or otherwise unacceptable behavior may be
5858
reported by contacting the project team at [email protected]. All
5959
complaints will be reviewed and investigated and will result in a response that
6060
is deemed necessary and appropriate to the circumstances. The project team is
61-
obligated to maintain confidentiality with regard to the reporter of an incident.
62-
Further details of specific enforcement policies may be posted separately.
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.
6364

6465
Project maintainers who do not follow or enforce the Code of Conduct in good
6566
faith may face temporary or permanent repercussions as determined by other
6667
members of the project's leadership.
6768

6869
## Attribution
6970

70-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71-
available at [http://contributor-covenant.org/version/1/4][version]
71+
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]
7273

7374
[homepage]: http://contributor-covenant.org
7475
[version]: http://contributor-covenant.org/version/1/4/

other/MAINTAINING.md

Lines changed: 42 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,60 +4,67 @@ This is documentation for maintainers of this project.
44

55
## Code of Conduct
66

7-
Please review, understand, and be an example of it. Violations of the code of conduct are
8-
taken seriously, even (especially) for maintainers.
7+
Please review, understand, and be an example of it. Violations of the code of
8+
conduct are taken seriously, even (especially) for maintainers.
99

1010
## Issues
1111

12-
We want to support and build the community. We do that best by helping people learn to solve
13-
their own problems. We have an issue template and hopefully most folks follow it. If it's
14-
not clear what the issue is, invite them to create a minimal reproduction of what they're trying
15-
to accomplish or the bug they think they've found.
12+
We want to support and build the community. We do that best by helping people
13+
learn to solve their own problems. We have an issue template and hopefully most
14+
folks follow it. If it's not clear what the issue is, invite them to create a
15+
minimal reproduction of what they're trying to accomplish or the bug they think
16+
they've found.
1617

1718
Once it's determined that a code change is necessary, point people to
18-
[makeapullrequest.com](http://makeapullrequest.com) and invite them to make a pull request.
19-
If they're the one who needs the feature, they're the one who can build it. If they need
20-
some hand holding and you have time to lend a hand, please do so. It's an investment into
21-
another human being, and an investment into a potential maintainer.
19+
[makeapullrequest.com](http://makeapullrequest.com) and invite them to make a
20+
pull request. If they're the one who needs the feature, they're the one who can
21+
build it. If they need some hand holding and you have time to lend a hand,
22+
please do so. It's an investment into another human being, and an investment
23+
into a potential maintainer.
2224

23-
Remember that this is open source, so the code is not yours, it's ours. If someone needs a change
24-
in the codebase, you don't have to make it happen yourself. Commit as much time to the project
25-
as you want/need to. Nobody can ask any more of you than that.
25+
Remember that this is open source, so the code is not yours, it's ours. If
26+
someone needs a change in the codebase, you don't have to make it happen
27+
yourself. Commit as much time to the project as you want/need to. Nobody can ask
28+
any more of you than that.
2629

2730
## Pull Requests
2831

29-
As a maintainer, you're fine to make your branches on the main repo or on your own fork. Either
30-
way is fine.
32+
As a maintainer, you're fine to make your branches on the main repo or on your
33+
own fork. Either way is fine.
3134

32-
When we receive a pull request, a travis build is kicked off automatically (see the `.travis.yml`
33-
for what runs in the travis build). We avoid merging anything that breaks the travis build.
35+
When we receive a pull request, a travis build is kicked off automatically (see
36+
the `.travis.yml` for what runs in the travis build). We avoid merging anything
37+
that breaks the travis build.
3438

35-
Please review PRs and focus on the code rather than the individual. You never know when this is
36-
someone's first ever PR and we want their experience to be as positive as possible, so be
37-
uplifting and constructive.
39+
Please review PRs and focus on the code rather than the individual. You never
40+
know when this is someone's first ever PR and we want their experience to be as
41+
positive as possible, so be uplifting and constructive.
3842

3943
When you merge the pull request, 99% of the time you should use the
40-
[Squash and merge](https://help.github.com/articles/merging-a-pull-request/) feature. This keeps
41-
our git history clean, but more importantly, this allows us to make any necessary changes to the
42-
commit message so we release what we want to release. See the next section on Releases for more
43-
about that.
44+
[Squash and merge](https://help.github.com/articles/merging-a-pull-request/)
45+
feature. This keeps our git history clean, but more importantly, this allows us
46+
to make any necessary changes to the commit message so we release what we want
47+
to release. See the next section on Releases for more about that.
4448

4549
## Release
4650

47-
Our releases are automatic. They happen whenever code lands into `master`. A travis build gets
48-
kicked off and if it's successful, a tool called
49-
[`semantic-release`](https://github.com/semantic-release/semantic-release) is used to
50-
automatically publish a new release to npm as well as a changelog to GitHub. It is only able to
51-
determine the version and whether a release is necessary by the git commit messages. With this
52-
in mind, **please brush up on [the commit message convention][commit] which drives our releases.**
51+
Our releases are automatic. They happen whenever code lands into `master`. A
52+
travis build gets kicked off and if it's successful, a tool called
53+
[`semantic-release`](https://github.com/semantic-release/semantic-release) is
54+
used to automatically publish a new release to npm as well as a changelog to
55+
GitHub. It is only able to determine the version and whether a release is
56+
necessary by the git commit messages. With this in mind, **please brush up on
57+
[the commit message convention][commit] which drives our releases.**
5358

54-
> One important note about this: Please make sure that commit messages do NOT contain the words
55-
> "BREAKING CHANGE" in them unless we want to push a major version. I've been burned by this
56-
> more than once where someone will include "BREAKING CHANGE: None" and it will end up releasing
57-
> a new major version. Not a huge deal honestly, but kind of annoying...
59+
> One important note about this: Please make sure that commit messages do NOT
60+
> contain the words "BREAKING CHANGE" in them unless we want to push a major
61+
> version. I've been burned by this more than once where someone will include
62+
> "BREAKING CHANGE: None" and it will end up releasing a new major version. Not
63+
> a huge deal honestly, but kind of annoying...
5864
5965
## Thanks!
6066

6167
Thank you so much for helping to maintain this project!
6268

63-
[commit]: https://github.com/conventional-changelog-archived-repos/conventional-changelog-angular/blob/ed32559941719a130bb0327f886d6a32a8cbc2ba/convention.md
69+
[commit]:
70+
https://github.com/conventional-changelog-archived-repos/conventional-changelog-angular/blob/ed32559941719a130bb0327f886d6a32a8cbc2ba/convention.md

other/manual-releases.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# manual-releases
22

3-
This project has an automated release set up. So things are only released when there are
4-
useful changes in the code that justify a release. But sometimes things get messed up one way or another
5-
and we need to trigger the release ourselves. When this happens, simply bump the number below and commit
6-
that with the following commit message based on your needs:
3+
This project has an automated release set up. So things are only released when
4+
there are useful changes in the code that justify a release. But sometimes
5+
things get messed up one way or another and we need to trigger the release
6+
ourselves. When this happens, simply bump the number below and commit that with
7+
the following commit message based on your needs:
78

89
**Major**
910

0 commit comments

Comments
 (0)