Minor QUnit test fixes

Avoid using globals
Tell test how many to expect

Change-Id: Ied1cd5f0ae56951bfad37772a0a73dcd251b51b3
Merge "Minor QUnit test fixes"