Michał Jarosz
Michał Jarosz
I see the same issues when mocking `fetch` but using `new Response(...)` from fetch polyfill (`whatwg-fetch`). I had this in my code ```typescript jest.spyOn(window, 'fetch').mockResolvedValue(new Response(toJSONBlob(mockValue))); await screen.findByText('something'); ``` And...
I've created repo to demonstrate the issue https://github.com/mjetek/tl-fake-timer with test file https://github.com/mjetek/tl-fake-timer/blob/main/src/App.test.js It does work with @testing-library/react 11 but fails with 12
I figured out that the issue is caused by use of `setImmediate` in the jsdom implementation of the `FileReader`. if I change my test to delay updating state with ```javascript...
I've realised the issue is caused by jsdom still using real timers even though fake timers are used in the test. I don't know if this is expected behaviour. I've...
I think setting different fake timers implementation shouldn't be in the scope of this library. It would make more sense for jest to allow different fake timers implementations. But I...
if someone is using mocha and mock timers with sinon is this not supported? I think testing-library should work with any test runner + fake timers combination but should not...