Add qunit tests

Anyone have an opinion on qunit vs jasmine? I've used qunit before so that's that's the basis of this PR. I've heard good things about some other testing frameworks but this doesn't need async.

The best description I've heard is: "qunit and jasmine are kind of in a competing to be the worst testing framework".