Refactor tests to ease transition to QUnit 2.1+

Closes #485