Tags: testing-library/react-hooks-testing-library
Tags
fix(server): remove act around server renderer to fix support for old… …er versions of react * refactor(server/pure): remove unnecessary type annotation * feat: add ssr.test.ts This adds a new test to verify that renderHook can be called in an SSR-like environment based on the changes implemented in #607. * chore: update contributors table * refactor: remove act call in render in sever/pure @mpeyper explained how this `act` call in server rendering is not really necessary so we can remove it.
feat(async-utils): async utils advance fake timer automatically when … …waiting Fixes #631 * add jestFakeTimersAreEnabled and use it to detect faketimer in createTimeoutController (#688) * fix fakeTimer problem * add new fakeTimer test and revise the function * add advanceTime * revise the advanceTime * use jest.advanceTimersByTime * change timeout type * fix converage and revise type * test(fake-timers): add more tests to test suite for fake timers * fix the code after code review and clean up * fix the test timeout is false * clean up * fix coverage * add skip for pass checkers * add comment * test(async-utils): enable test to test CI fix * test(async-utils): combine fake timer tests with async tests * refactor(async-utils): Move DEFAULT_TIMEOUT out of timeout controller * refactor(async-utils): move fake timer advancement into seperate utility * refactor(async-utils): simplify fake timer advancement logic * docs: add chris110408 as a contributor for code * refactor(async-utils): only advance timers on a single timeoutController BREAKING CHANGE: tests that used to manually advance fake timers and use async utilities may now fail as timer would advance further Co-authored-by: Lei Chen <leichen@Leis-MacBook-Pro.local> Co-authored-by: Michael Peyper <mpeyper7@gmail.com>
fix(types): fix `cleanup` return type to match `async` implementation * fix(types): fix `cleanup` return type to match `async` implementation * test: refactor tests to reduce duplication for different renderers * test: refactor `hydratedServerRenderer` and added comment for clarity about it
feat: Remove node specific dependencies and code to better support te… …sting in browser environments * feat: removed filter-console dependency and fallback if process.env is not available (#624) * fix: protect import helpers for setting env variables and comment why try/catch is being used BREAKING CHANGE: `suppressErrorOutput` will now work when explicitly called, even if the `RHTL_DISABLE_ERROR_FILTERING` env variable has been set Fixes #617
PreviousNext