Tags: daotoad/react-hooks-testing-library
Tags
refactor: async utils (testing-library#537) * feat: use default values for interval and timeout in async utils BREAKING CHANGE: `interval` will now default to 50ms in async utils BREAKING CHANGE: `timeout` will now default to 1000ms in async utils BREAKING CHANGE: `suppressErrors` has been removed from async utils * refactor: move timeoutPromise into callAfter helper * fix: react is not an optional peerDependency * refactor: return boolean instead of throwing error to handle timeout
fix: stop appending container elements to document body
fix: fixed potential error when hook suspends and current result is a… …ccessed BREAKING CHANGE: Adjust types so that react renderer exports don't required extra generic parameter
fix: constrain TOptions to be an object instead of an empty interface
fix: display returned function names correctly in stack traces (testi… …ng-library#528) Refactors for consistency. * refactor: change functions to be more consistent between regular functions and arrow functions * refactor: rename testHook to be testHarness for consistency * refactor: remove default exports for consistency * fix: display returned function names correctly in stack traces * refactor: remove variable assignment in function name workaround Co-authored-by: Jonathan Peyper <[email protected]> Co-authored-by: Jonathan Peyper <[email protected]>
fix: Type for options in autodetected renderer was incorrectly inferr… …ing any passed type (testing-library#527) Changed `renderHook` in `ReactHooksRenderer` type to not use a generic for options but rather the react specific `RendererOptions`. Moved `ReactHooksRenderer` into react specific types as all auto-detected renders are react renderers. All modules are currently exporting both the shared types and the react types so this a non-breaking change.
Merge pull request testing-library#526 from testing-library/bugfix/be… …ta-pure-typeerror fix: ReactHooksRenderer renderHook was not expecting arguments