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

Collect code coverage data #463

Closed
danvk opened this issue Nov 11, 2014 · 4 comments · Fixed by #516
Closed

Collect code coverage data #463

danvk opened this issue Nov 11, 2014 · 4 comments · Fixed by #516

Comments

@danvk
Copy link
Owner

danvk commented Nov 11, 2014

blanket.js and coveralls.io are a killer combo. We've done the hard work of writing the unit tests, let's get the payoff!

@danvk
Copy link
Owner Author

danvk commented Nov 11, 2014

... or perhaps not so simple. See https://github.com/danielmlipton/travis-ci-js-test-driver

@danvk
Copy link
Owner Author

danvk commented Nov 12, 2014

The easiest way to get this might be to port our tests to Mocha or QUnit. We should probably do this anyway, it looks like js-test-driver has stagnated (no releases in >2 years).

@danvk
Copy link
Owner Author

danvk commented Dec 6, 2014

I followed the jstd coverage instructions and got some basic numbers. Generally coverage is pretty high! I'll see if I can generate an HTML report.

100.0%: /dygraph-plugin-install.js
100.0%: /dygraph-plugin-base.js
100.0%: /dygraph-dev.js
100.0%: /datahandler/bars.js
 99.0%: /plugins/chart-labels.js
 98.0%: /datahandler/bars-custom.js
 96.9%: /plugins/axes.js
 96.8%: /dygraph-tickers.js
 96.2%: /dygraph-layout.js
 96.0%: /dygraph-canvas.js
 95.7%: /datahandler/bars-error.js
 95.4%: /plugins/grid.js
 95.2%: /dygraph-options.js
 94.0%: /dashed-canvas.js
 93.6%: /datahandler/default.js
 91.3%: /datahandler/bars-fractions.js
 90.6%: /datahandler/default-fractions.js
 89.7%: /dygraph-utils.js
 87.6%: /plugins/annotations.js
 86.8%: /plugins/range-selector.js
 86.4%: /dygraph.js
 82.6%: /dygraph-options-reference.js
 72.4%: /plugins/legend.js
 59.3%: /dygraph-interaction-model.js
 59.1%: /datahandler/datahandler.js
 43.3%: /extras/smooth-plotter.js
 27.2%: /dygraph-gviz.js

@danvk
Copy link
Owner Author

danvk commented Dec 6, 2014

And here's a nicer view on coveralls.io.

Overall code coverage is ~87%. Some areas that are really lacking testing include:

  • GViz DataTable inputs
  • fractions
  • A few specific options, e.g. labelsKMG2, legend: follow, panEdgeFraction
  • resizing
  • touch events

This also brings up a lot of IE checks that we missed!

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 a pull request may close this issue.

1 participant