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

Wrap perf.now calls to avoid stale mock impls #378

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

domarmstrong
Copy link

I'm running in to the same issue as described by #351.

However I think a simpler solution is to wrap the calls to get now, avoiding any need for developer intervention to update the implementation.

Alternatively you could wrap the whole statement in a getter and check if performance is available for every call too. That isn't an issue though in the situation with using sinon timers though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant