Add tests

Adds a test suite :) 

~~I've also added some blank tests, assuming it should log errors if things break. If it would be better to move them to a separate PR with the code, that's fine.~~ I've added these as an issue.

Please review @perry and @incuna/js 
This should be `~1.2`