Urgent fix: Provide greater expect-ations (fix breaking tests)

Make use of expect in qunit tests
(see change I214b3d4da46f3f3bb0fcde313ac2d82439e40e3c)
Avoid using module and test as a global

(All tests are currently failing with latest core so please merge
this asap)

Change-Id: I545cd1520ac4b0f945b71f76479473bcebe66573
Merge "Urgent fix: Provide greater expect-ations (fix breaking tests)"