-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Monorepo #98
Conversation
There was an issue with a major release, so this manual-releases.md change is to release a new major version. BREAKING CHANGE: release 1.0.0
…ng-library#4) * Add faq entry about dealing with multiple data-testid with the same value * Add contributor * Generalize selector * Update .all-contributorsrc * Update README.md
Because it really matters 👍
* feat(typings): add ts definitions * chore(contributors): add myself
Adding docs about the other HTTP methods.
* feat(typings): add ts definitions * chore(contributors): add myself
* feat: Add getByTestId utility * Updates to getByTestId documentation * minor tweaks
…brary#11) (testing-library#15) * Add FAQ section about how flushPromises work * Some subtle changes
…library#17) **What**: Add the following methods - queryByText - getByText - queryByPlaceholderText - getByPlaceholderText - queryByLabelText - getByLabelText **Why**: Closes testing-library#16 These will really improve the usability of this module. These also align much better with the guiding principles 👍 **How**: - Created a `queries.js` file where we have all the logic for the queries and their associated getter functions - Migrate tests where it makes sense - Update docs considerably. **Checklist**: * [x] Documentation * [x] Tests * [x] Ready to be merged <!-- In your opinion, is this ready to be merged as soon as it's reviewed? --> * [ ] Added myself to contributors table N/A
Just because the new feature in 3.1.0 is one I want to make sure people get.
In real applications, your `onChange` handler wont be called if the value did not change, so the tests shouldn't either. This is another step toward us not using Simulate at all. When using `fireEvent.change` make sure that you're setting the value to change to via: `{target: {value: 'the value'}}` as the second arg.
Revert "fix(change): no longer using Simulate.change" This reverts commit b46415031a529f7421e637526b98165738fc3f84.
In real applications, your `onChange` handler wont be called if the value did not change, so the tests shouldn't either. This is another step toward us not using Simulate at all. When using `fireEvent.change` make sure that you're setting the value to change to via: `{target: {value: 'the value'}}` as the second arg. BREAKING CHANGE: If you used the old form of value changes you'll need to update your code to the new form: Before: ```js formField.value = newValue; fireEvent.change(formField); ``` After: ```js fireEvent.change(formField, {target: {value: newValue}}); ```
"It's vs Its"
"this add custom jest matchers" → "this adds custom jest matchers"
Update example of fireEvent usage, complying with new 5.0.0 version.
…y#168) * Update typings for optional option arguments Both the container and the baseElement are optional. * container is not optional
Add `import React from 'react'` to simple debug example. <!-- Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated! Please make sure that you are familiar with and follow the Code of Conduct for this project (found in the CODE_OF_CONDUCT.md file). Also, please make sure you're familiar with and follow the instructions in the contributing guidelines (found in the CONTRIBUTING.md file). If you're new to contributing to open source projects, you might find this free video course helpful: http://kcd.im/pull-request Please fill out the information below to expedite the review and (hopefully) merge of your pull request! --> <!-- What changes are being made? (What feature/bug is being fixed here?) --> **What**: The example in README.md has a ReferenceError: `React is not defined` **Why**: Help others run the example by copying and pasting code. **How**: Quick markdown change. **Checklist**: - [ ] Documentation N/A - [ ] TestsN/A - [x] Ready to be merged <!-- In your opinion, is this ready to be merged as soon as it's reviewed? --> - [ ] Added myself to contributors table <!-- this is optional, see the contributing guidelines for instructions -->
<!-- What changes are being made? (What feature/bug is being fixed here?) --> **What**: "Wait" section was missing `queryByText` destructuring assignment, example doesn't work without it. https://github.com/kentcdodds/react-testing-library#wait **Why**: added the missing queryByText assignment. **How**: Edited the README.md manually and run `npm run add-contributor` to update contributors file (following https://github.com/kentcdodds/react-testing-library/blob/master/CONTRIBUTING.md) **Checklist**: - [x] Documentation - [x] Tests - [x] Ready to be merged - [x] Added myself to contributors table
Parenthesis was incorrectly placed, this example was driving me insane for an hour believe it or not! :) <!-- Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated! Please make sure that you are familiar with and follow the Code of Conduct for this project (found in the CODE_OF_CONDUCT.md file). Also, please make sure you're familiar with and follow the instructions in the contributing guidelines (found in the CONTRIBUTING.md file). If you're new to contributing to open source projects, you might find this free video course helpful: http://kcd.im/pull-request Please fill out the information below to expedite the review and (hopefully) merge of your pull request! --> <!-- What changes are being made? (What feature/bug is being fixed here?) --> **What**: A typo in the Documentation for `wait` <!-- Why are these changes necessary? --> **Why**: The example drove me mad ! :) The misplaced parenthesis was hard to notice. <!-- How were these changes implemented? --> **How**: By correcting the typo! :) <!-- Have you done all of these things? --> **Checklist**: <!-- add "N/A" to the end of each line that's irrelevant to your changes --> <!-- to check an item, place an "x" in the box like so: "- [x] Documentation" --> - [X] Documentation - [X] Tests - [X] Ready to be merged <!-- In your opinion, is this ready to be merged as soon as it's reviewed? --> - [x] Added myself to contributors table <!-- this is optional, see the contributing guidelines for instructions --> <!-- feel free to add additional comments -->
Small PR to add the blog post article [Creating Readable Tests Using React Testing Library](https://medium.com/flatiron-labs/creating-readable-tests-using-react-testing-library-2bd03c49c284) to the [Learning Material](https://github.com/kentcdodds/react-testing-library#learning-material) section.
Is it possible to still have the release process automated with this approach? |
It would be amazing if that's possible, because this certainly makes other things easier. Also, I'd be more than happy to have jest-dom in here as well, if this ends up happening. |
Looks like it: https://github.com/atlassian/lerna-semantic-release |
Hmmmm... Last commit was a year ago. Some of my favorite semantic-release features were worked on in the last year. But let's see... |
FYI - there are a few things not working yet.
If you are interested in pursuing this we can come up with a plan on how to do it. One thing I'm particularly excited about is having a good place to start with a combined doc website. |
I honestly feel like we're getting pretty close to this suite of projects being "finished" meaning there wont be much need to make many changes. With that in mind I think making this a monorepo would be more work than it would be worth. Thanks, but I think I want to pass on this. |
This is just a proposal - browse the branch here to see what it would look like https://github.com/alexkrolick/dom-testing-library/tree/monorepo
What:
Combine dom-testing-library with react-testing-library and other libraries in a monorepo
Why:
How:
Using lerna
(Note usage of
lerna import
to bring in Git history forreact-testing-library
)