First task is to decide on a test framework. Any suggestions?*
I'd say it should run in the browser and be compatible with Travis. I need to have a look around; does such a thing even exist. QUnit comes to mind for the first, no doubt there are others*
*Cue Holy War.
Whoever writes the 10 first tests get to choose the framework :)
I suspect we'll need to refactor the JS before we can really test it.
I choose to go with selenium as it should be easy to integrate with SauceLabs and Travis.
I'll probably refactor the logic a bit before submitting the PR, but wanted to solicit feedback.
This looks good, don't forget to add the manual in docs/contributing.rst.