Skip to content

Fake timers in Sinon doesn't work with performance-now #20

@Saegrov

Description

@Saegrov

We have a use-case where we are using Sinons-fake timers in our unit tests. http://sinonjs.org/releases/v4.0.1/fake-timers/

Sinon (or lolex) hijacks globals like process.hrtime to allow faking time.

Using performance-now with Sinon doesn't work since performance-now keeps a reference to process.hrtime. When Sinon patches the global hrtime, performance-now still keeps a reference to the original hrtime

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions