Move fixtures into #qunit-fixture

We rely on certain globals being set, so I've moved the tested code and
tests to below #qunit-fixture. I'm unsure on whether this is the best
approach. @aaronjorbin do you have any ideas? :)