Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timer doesn't count if timers are faked #5

Open
SimenB opened this issue Nov 13, 2019 · 0 comments
Open

Timer doesn't count if timers are faked #5

SimenB opened this issue Nov 13, 2019 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed upstream parity

Comments

@SimenB
Copy link
Member

SimenB commented Nov 13, 2019

If time is faked, the counter won't work (it's bases on setInterval). Not sure how to obtain a reference to real timers, might need a change in Jest.

https://github.com/jest-community/jest-react-reporter/blob/de507dccce388a56271a640fed128c82dab93192/src/hooks.ts

Jest's default reporter is not affected as it uses Date.now which is not faked. Will need to fix this before making Lolex the implementation behind fake timers

@SimenB SimenB added bug Something isn't working help wanted Extra attention is needed upstream parity labels Nov 13, 2019
@SimenB SimenB changed the title Timer doesn't count Timer doesn't count if timers are faked Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed upstream parity
Projects
None yet
Development

No branches or pull requests

1 participant