Fixed wrong checks for undefined in QUnit tests

Change-Id: I808828b46f8c35eb1e3698bfa9a247eef90b02b5
Merge "Fixed wrong checks for undefined in QUnit tests"