Skip to content
This repository has been archived by the owner on Mar 17, 2020. It is now read-only.

Add a proper test suite #165

Open
caged opened this issue Aug 24, 2016 · 3 comments
Open

Add a proper test suite #165

caged opened this issue Aug 24, 2016 · 3 comments
Labels
Milestone

Comments

@caged
Copy link
Owner

caged commented Aug 24, 2016

This project started as a hack to get a minimal svg tooltip working with d3. Nothing at the time existed that targeted SVG specifically. Once it worked well enough for my needs, I documented it and through it up on GitHub. Without a test suite.

Not having a proper test suite created a significant burden to accepting contributions since there was no baseline level checks to ensure that a contributions passed the most basic requirements before code review. Having a test suite would give us confidence that changes we introduce would not break existing assumptions and also raise the quality bar for contributions.

This is pretty high on my personal priority list for this project.

/cc @vdh

@vdh
Copy link
Collaborator

vdh commented Aug 24, 2016

A test suite is exactly what I had in mind too. I've had some experience before using the Mocha framework and istanbul for code coverage.

As for testing the actual DOM changes, I'm a bit green there, potentially something using jsdom to simulate the DOM. The more heavy-duty options I've seen out there are PhantomJS or Selenium to run the code within a headless browser/renderer. I've also seen some even-heavier-duty setups that just straight up run the unit tests on the local machine's Chrome browser (of course, I doubt that option would be able to run on CI servers).

@vdh vdh added this to the v0.8.0 milestone Sep 20, 2016
@vdh vdh mentioned this issue Sep 21, 2016
17 tasks
@caged
Copy link
Owner Author

caged commented Sep 21, 2016

I've been pretty happy with tape and jsdom, which is what d3 itself uses. It's a pretty feature-light test suite that likely gives us all we need. Here's some samples from d3-selection: https://github.com/d3/d3-selection/blob/master/test/select-test.js

@stale
Copy link

stale bot commented May 1, 2018

Hey there! It looks like this issue has been automatically marked as stale because it has not had recent activity. To help the maintainers stay focused, it will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 1, 2018
@caged caged added the pinned label May 1, 2018
@stale stale bot removed the stale label May 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants