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

Render charts only once in time scale tests #6347

Merged
merged 1 commit into from Jun 25, 2019

Conversation

benmccann
Copy link
Contributor

In many of the time scale tests, we render the chart and then update it to some certain dimensions. This makes it very difficult to step through the code with a debugger because the first time we hit any line of code doesn't affect the ultimate state of the chart. It also makes the tests take longer to run than necessary.

This passes the dimensions into the creation function so that it's created with the correct dimensions from the beginning.

@kurkle
Copy link
Member

kurkle commented Jun 23, 2019

I tend to extract tests for debugging, so haven't had this issue.
That said, the only objection I can think of is maybe losing testing of 2nd update to scale with new dimensions, can you check existence / add that kind of test?

@benmccann
Copy link
Contributor Author

Thanks for taking a look. None of the tests I've changed are testing a 2nd update of scale.

Copy link
Contributor

@nagix nagix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@benmccann benmccann requested a review from kurkle June 25, 2019 16:14
@etimberg etimberg merged commit d480e11 into chartjs:master Jun 25, 2019
@nagix nagix added this to the Version 2.9 milestone Jun 26, 2019
exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants