Skip to content

Timer doesn't count if timers are faked #5

Open
@SimenB

Description

@SimenB

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions