Tags: TheBrainFamily/wait-for-expect
Tags
fix: Add Promise<void> return type for expectation (#26) * fix: add Promise<void> return type for expectation Since 0.6.0 promises and async/await are supported and tested, but the return type of the expectation function did not yet reflect this change. * fix SecurityError when running tests Jest fails the tests with “SecurityError: localStorage is not available for opaque origins”. Setting the Jest configuration option "testURL" to "http://localhost/" fixes this (also see: jsdom/jsdom#2304 (comment)). It’s probably a good idea to upgrade dependencies and remove this option afterwards, since with the current release of Jest this option is no longer required (it defaults to "http://localhost/“ instead of “about:blank”).
fix: Transpile Object.assign which is not available in IE 11 (#25) * chore: Bump typescript to 3.2.4 3.1 needed for module scope properties but this breaks eslint typescript parser. Bumping that requires 3.2 so we end up using 3.2 * Fix false positive no-unused-vars
feat: Add runWithRealTimers & getSetTimeoutFn functions * Add runWithRealTimers & getSetTimeoutFn functions BREAKING CHANGE: If you are using fake jest timers by default, but upgraded to v2.0 here, you might have to upgrade your tests. Sorry! :( Co-authored-by: Brais Piñeiro <[email protected]>
Get setTimeout lazily (#20) * Get setTimeout and Date.now lazily This prevents from using old versions of setTimeout/Date.now * Modify withFakeTimers unit test to cover the correct scenario BREAKING CHANGE: If you combined fake timers with wait-for-expect that will most probably not work anymore. Please make an issue with your failing usecase, as we couldn't think of a situation where using wait-for-expect and fake timers in the same test would be necessary.