Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@yelper
Copy link

@yelper yelper commented Apr 27, 2021

Hey, this is quite a minor change -- I'm fine if you don't take it.

However, we've found (in Power BI visual development) that mocking requestAnimationFrame() allows us to "speed" through d3.transitions() in our unit tests. We've made this change locally for our d3's distribution, I thought it might be useful to share here.

We use jasmine's clock to tick forward in time. We also use a "Scheduler" class to mock RAF to execute immediately, so we also make this change in the d3 source. Again, this is a "testability"-only change that may be useful to others mocking time in unit tests :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant