Add test framework and initial test

Hi, I saw in the readme that tests were on the to-do list, and as I've been doing a lot of JS testing recently I thought I'd have a go. These tests use a fake DOM so they should provide good assurance that the module is working end-to-end, and as they are testing the module's behaviour, will not lock down the internal implementation at all.

I've only implemented a single test to prove the example in the readme, but obviously these can be added to if you're happy with this approach.

After installing the new dependencies, ```npm test``` will run them.

Cheers.