Behavior-driven development with Karma and Mocha Chai
All of these will take you pretty far towards having more confidence in your visualizations, but another step you can take to be even more of a rock star is adding automated testing to your projects.
There are many reasons to write automated tests. If you have a product that needs to render charts reliably and the chart rendering is merely a part of a much larger application, you will likely want to use automated testing to ensure that changes to the application don't break your charts. Likewise, if you've created an open source project that receives a lot of pull requests from various people who use your library, you might want tests to ensure that none of this outside code causes regressive ...
Get D3.js: Cutting-edge Data Visualization now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.