Tags: context-ui/react-hooks-testing-library
Tags
feat(async-utils): async utils advance fake timer automatically when … …waiting Fixes testing-library#631 * add jestFakeTimersAreEnabled and use it to detect faketimer in createTimeoutController (testing-library#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 <[email protected]> Co-authored-by: Michael Peyper <[email protected]>
fix(async-utils): prevent timeout and interval checks in wait from le… …aving open handles (testing-library#682) * fix(async-utils): prevent timeout and interval checks in wait from leaving open handles * refactor(async-utils): rename timeoutSignal to timeoutController
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 (testing-library#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 testing-library#617
chore: Drop Node 10 support (testing-library#623) BREAKING CHANGE: Node 10 is no longer supported Fixes testing-library#621 Co-authored-by: Michaël De Boey <[email protected]>
fix(ssr): Add ability to run SSR tests in pure-node environment (test… …ing-library#607) * fix(ssr): div container created only during hydration It allows to run tests in real node environment, where no DOM global objects exists. Fix: testing-library#605 * chore: add xobotyi to hall of fame %)
fix: make library compatible with Node 8 (testing-library#587)
feat: export helper to manually suppress error output (testing-librar… …y#571) * feat(console): export helper to manually suppress error output Fixes testing-library#564 * docs: added docs for `suppressErrorOutput` * fix(types): fix type of `suppressErrorOutput` to make result callable to restore console * test: add tests for `suppressErrorOutput` export * test: fix error suppression disabled tests for other renderers
PreviousNext