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

Tests cleanup #3287

Merged
merged 3 commits into from
Sep 15, 2016
Merged

Tests cleanup #3287

merged 3 commits into from
Sep 15, 2016

Conversation

simonbrunel
Copy link
Member

@simonbrunel simonbrunel commented Sep 11, 2016

  • new options parameter to acquire a chart, allowing to configure canvas and wrapper attributes
  • charts are now automatically deleted after each tests (ignored if persistent option is true)
  • fix unit tests that was using a global instance but was supposed to test a local chart
  • make sure that all charts are locally acquired and released (no more global instance)
  • Jasmine custom matchers are automatically exposed to all tests

For convenience, charts are now automatically released after each spec if they are not acquired using `persistent: true`. Also remove the confusing and error prone `chartInstance` global variable and make sure that chart instances are local to each spec.
Some tests were using the removed global `chartInstance` variable, so tests values were incorrect since against the wrong chart instance.
@etimberg
Copy link
Member

LGTM 👍

@simonbrunel
Copy link
Member Author

@chartjs/contributors should someone else check that one and merge it if ok?

@etimberg etimberg merged commit b5544d1 into chartjs:master Sep 15, 2016
@simonbrunel simonbrunel deleted the tests-cleanup branch September 25, 2016 08:22
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants