Skip to content

Tags: Code-Case/react-testing-library

Tags

v5.2.3

Toggle v5.2.3's commit message
fix(umd): ship umd build

Closes testing-library#129

v5.2.2

Toggle v5.2.2's commit message
chore: update url

v5.2.1

Toggle v5.2.1's commit message
fix: remove wait-for-expect from dependencies (testing-library#205)

**What**:

Remove unused dependency from `package.json`

**Why**:

This package is not used here directly. Dom-testing-library uses it though and declares it there already: https://github.com/kentcdodds/dom-testing-library/blob/master/package.json#L43

On the other hand, in case if dom-testing-library would use a new major version of the dependency, there will be unwanted package duplication, because this line will stay. 

Packages should not declare dependencies on other packages, that they actually do not use.

**Checklist**:

- (N/A) Documentation 
- (N/A) Tests 
- [x] Ready to be merged
      <!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->
- (N/A) Added myself to contributors table 
      <!-- this is optional, see the contributing guidelines for instructions -->

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

v5.2.0

Toggle v5.2.0's commit message
feat: add `asFragment` return value from `render` (testing-library#192)

<!--
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**:
Adds the possibility to get a `DocumentFragment` version of the rendered component.

<!-- Why are these changes necessary? -->

**Why**:
I have a test of a connected redux component, and I want to snapshot the diff between them after dispatching an action. Since `container` is a live binding, its `innerHTML` changes, meaning comparison becomes meaningless.

An extra advantage is IMO that you don't need to do `firstChild` on snapshots, as having the `Fragment` wrapper makes sense. At least in my mind 🙂 

<!-- How were these changes implemented? -->

**How**:
By upgrading `kcd-scripts` to a version with Jest 23, and adding a dependency on `JSDOM` which matches the one found in Jest (to not rely on dependency hoisting).

<!-- 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? -->
- [ ] Added myself to contributors table
      <!-- this is optional, see the contributing guidelines for instructions -->

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

v5.1.1

Toggle v5.1.1's commit message
fix: update dom-testing-library (testing-library#190)

v5.1.0

Toggle v5.1.0's commit message
feat(render): expose option to override bound queries (testing-librar…

…y#177)

* New: expose option to override bound queries

* remove unecessary default

dom-testing-library will default the queries for us: https://github.com/kentcdodds/dom-testing-library/blob/cbbda90762f9b5c97471841b0d00f05ddfe772ba/src/get-queries-for-element.js#L12

v5.0.1

Toggle v5.0.1's commit message
fix(TS): update typings for optional option arguments (testing-librar…

…y#168)

* Update typings for optional option arguments

Both the container and the baseElement are optional.

* container is not optional

v5.0.0

Toggle v5.0.0's commit message
fix(change): no longer using Simulate.change

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}});
```

v4.1.8

Toggle v4.1.8's commit message
fix(change): no longer using Simulate.change

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.

v4.1.7

Toggle v4.1.7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: force upgrade of dom-testing-library

Just because the new feature in 3.1.0 is one I want to make sure people get.