Skip to content

Releases: testing-library/react-hooks-testing-library

v5.1.0

01 Mar 15:37
d8dac20
Compare
Choose a tag to compare

5.1.0 (2021-03-01)

Features

  • export helper to manually suppress error output (#571) (d8dac20), closes #564

v5.0.3

24 Jan 08:51
Compare
Choose a tag to compare

5.0.3 (2021-01-24)

Bug Fixes

  • fixed potential error when hook suspends and error is accessed (1a0c4d3)

v5.0.2

22 Jan 10:13
804d9ac
Compare
Choose a tag to compare

5.0.2 (2021-01-22)

Bug Fixes

  • only suppress console.error for non-pure imports (#549) (804d9ac), closes #546

Code Refactoring

  • update default renderer's error message. (#547) (83b85c2)

Note: due to a technical glitch, there was no v5.0.1 release.

v5.0.0

13 Jan 21:58
b81fd04
Compare
Choose a tag to compare

5.0.0 (2021-01-13)

Bug Fixes

  • constrain TOptions to be an object instead of an empty interface (3813b88)
  • display returned function names correctly in stack traces (#528) (a82d5ef)
  • fixed potential error when hook suspends and current result is accessed (dc21e59)
  • include render utils in RenderHook type (ca32bce)
  • ReactHooksRenderer renderHook was not expecting arguments (bb870e0)
  • stop appending container elements to document body (bab38d9)
  • Type for options in autodetected renderer was incorrectly inferring any passed type (#527) (4786242)
  • use actual line break in error message when auto-detect fails (a3fd0e2)

Code Refactoring

Features

  • react-dom and SSR compatible rendering (a25993f)
  • use error boundary to capture useEffect errors (#539) (b81fd04), closes #308

BREAKING CHANGES

  • interval will now default to 50ms in async utils
  • timeout will now default to 1000ms in async utils
  • suppressErrors has been removed from async utils
  • Adjust types so that react renderer exports don't required extra generic parameter
  • Importing from renderHook and act from @testing-library/react-hooks will now auto-detect which renderer to used based on the project's dependencies
    • peerDependencies are now optional to support different dependencies being required
    • This means there will be no warning if the dependency is not installed at all, but it will still warn if an incompatible version is installed
    • Auto-detection won't work with bundlers (e.g. Webpack). Please use as specific renderer import instead
  • result.current and result.error will now return undefined instead of null when the hook call suspends and they are accessed prior to being set for the first time
    • Note: accessing these values in a suspending scenario has been broken since version 3.6.0

v5.0.0-beta.12

13 Jan 18:49
b81fd04
Compare
Choose a tag to compare
v5.0.0-beta.12 Pre-release
Pre-release

5.0.0-beta.12 (2021-01-13)

Features

  • use error boundary to capture useEffect errors (#539) (b81fd04), closes #308

v5.0.0-beta.11

13 Jan 05:02
Compare
Choose a tag to compare
v5.0.0-beta.11 Pre-release
Pre-release

5.0.0-beta.11 (2021-01-13)

Bug Fixes

v5.0.0-beta.9

12 Jan 09:38
Compare
Choose a tag to compare
v5.0.0-beta.9 Pre-release
Pre-release

5.0.0-beta.9 (2021-01-12)

Bug Fixes

  • stop appending container elements to document body (bab38d9)

v5.0.0-beta.10

12 Jan 15:47
394f65a
Compare
Choose a tag to compare
v5.0.0-beta.10 Pre-release
Pre-release

5.0.0-beta.10 (2021-01-12)

Code Refactoring

BREAKING CHANGES

  • interval will now default to 50ms in async utils
  • timeout will now default to 1000ms in async utils
  • suppressErrors has been removed from async utils

v4.0.1

12 Jan 11:48
a334f80
Compare
Choose a tag to compare

4.0.1 (2021-01-12)

Bug Fixes

v5.0.0-beta.8

11 Jan 10:13
dc21e59
Compare
Choose a tag to compare
v5.0.0-beta.8 Pre-release
Pre-release

5.0.0-beta.8 (2021-01-11)

Bug Fixes

  • fixed potential error when hook suspends and current result is accessed (dc21e59)

BREAKING CHANGES

  • Adjust types so that react renderer exports don't required extra generic parameter