Skip to content

Commit 5257500

Browse files
author
Kent C. Dodds
authored
feat(render): deprecate renderIntoDocument and make it the default (#118)
Closes #116 BREAKING CHANGE: `renderIntoDocument` replaces `render` and `Simulate` is no longer exported (use `fireEvent` instead).
1 parent 6f1ce48 commit 5257500

30 files changed

+404
-385
lines changed

Diff for: .github/ISSUE_TEMPLATE.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ tutorial to learn how: http://kcd.im/pull-request
4343
4444
-->
4545

46-
* `react-testing-library` version:
47-
* `react` version:
48-
* `node` version:
49-
* `npm` (or `yarn`) version:
46+
- `react-testing-library` version:
47+
- `react` version:
48+
- `node` version:
49+
- `npm` (or `yarn`) version:
5050

5151
Relevant code or config
5252

Diff for: .github/ISSUE_TEMPLATE/Bug_Report.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ tutorial to learn how: http://kcd.im/pull-request
2222
2323
-->
2424

25-
* `react-testing-library` version:
26-
* `react` version:
27-
* `node` version:
28-
* `npm` (or `yarn`) version:
25+
- `react-testing-library` version:
26+
- `react` version:
27+
- `node` version:
28+
- `npm` (or `yarn`) version:
2929

3030
### Relevant code or config:
3131

Diff for: .github/ISSUE_TEMPLATE/Question.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ and feature requests so we recommend not using this medium to ask them here 😁
1212

1313
## ❓ Support Forums
1414

15-
* React Spectrum
16-
https://spectrum.chat/react-testing-library
17-
* Reactiflux on Discord
18-
https://www.reactiflux.com
19-
* Stack Overflow
15+
- React Spectrum https://spectrum.chat/react-testing-library
16+
- Reactiflux on Discord https://www.reactiflux.com
17+
- Stack Overflow
2018
https://stackoverflow.com/questions/tagged/react-testing-library
2119

2220
**ISSUES WHICH ARE QUESTIONS WILL BE CLOSED**

Diff for: .github/PULL_REQUEST_TEMPLATE.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ merge of your pull request!
3434

3535
<!-- to check an item, place an "x" in the box like so: "- [x] Documentation" -->
3636

37-
* [ ] Documentation
38-
* [ ] Tests
39-
* [ ] Ready to be merged <!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->
40-
* [ ] Added myself to contributors table <!-- this is optional, see the contributing guidelines for instructions -->
37+
- [ ] Documentation
38+
- [ ] Tests
39+
- [ ] Ready to be merged
40+
<!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->
41+
- [ ] Added myself to contributors table
42+
<!-- this is optional, see the contributing guidelines for instructions -->
4143

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

Diff for: .prettierrc

+2-1
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
}

Diff for: CHANGELOG.md

+3-2
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).

Diff for: CODE_OF_CONDUCT.md

+23-22
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,30 @@
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

1414
Examples of behavior that contributes to creating a positive environment
1515
include:
1616

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
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
2222

2323
Examples of unacceptable behavior by participants include:
2424

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
2626
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
28-
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
3030
address, without explicit permission
31-
* Other conduct which could reasonably be considered inappropriate in a
31+
- Other conduct which could reasonably be considered inappropriate in a
3232
professional setting
3333

3434
## Our Responsibilities
@@ -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/

Diff for: CONTRIBUTING.md

+16-17
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,33 +20,31 @@ 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
## Add yourself as a contributor
3130
32-
This project follows the [all contributors][all-contributors] specification.
33-
To add yourself to the table of contributors on the `README.md`, please use the
31+
This project follows the [all contributors][all-contributors] specification. To
32+
add yourself to the table of contributors on the `README.md`, please use the
3433
automated script as part of your PR:
3534
3635
```console
3736
npm run add-contributor
3837
```
3938
40-
Follow the prompt and commit `.all-contributorsrc` and `README.md` in the PR.
41-
If you've already added yourself to the list and are making
42-
a new type of contribution, you can run it again and select the added
43-
contribution type.
39+
Follow the prompt and commit `.all-contributorsrc` and `README.md` in the PR. If
40+
you've already added yourself to the list and are making a new type of
41+
contribution, you can run it again and select the added contribution type.
4442

4543
## Committing and Pushing changes
4644

4745
Please make sure to run the tests before you commit your changes. You can run
48-
`npm run test:update` which will update any snapshots that need updating.
49-
Make sure to include those changes (if they exist) in your commit.
46+
`npm run test:update` which will update any snapshots that need updating. Make
47+
sure to include those changes (if they exist) in your commit.
5048

5149
### opt into git hooks
5250

@@ -67,6 +65,7 @@ Please checkout the [the open issues][issues]
6765
Also, please watch the repo and respond to questions/bug reports/feature
6866
requests! Thanks!
6967

70-
[egghead]: https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github
68+
[egghead]:
69+
https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github
7170
[all-contributors]: https://github.com/kentcdodds/all-contributors
7271
[issues]: https://github.com/kentcdodds/react-testing-library/issues

0 commit comments

Comments
 (0)