Tags: codingnninja/react-testing-library
Tags
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
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}}); ```
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.
fix: Add baseElement to render return type (testing-library#151) * fix: Add baseElement to render return type * Set HTMLElement type to container and baseElement
fix(TS): declare optional argument to `debug` (testing-library#148)
fix: switch default baseElement to document.body (testing-library#145) * Switch default baseElement to document.body; fixes dom-testing-library testing-library#81. * add contributor to readme Closes testing-library/dom-testing-library#81
fix: ensure waitForElement responds to attribute and textNode changes… … by default (testing-library#137) * Ensure waitForElement responds to attribute and textNode changes by default * Add rbrtsmith as a contributor