I use QUnit for JavaScript unit testing, have quite a few tests already. Majority of them uses assert in the way:
ok(condition.isTrue());
These tests are run well by Visual Studio embeded tests system (in the "Test Explorer") and by 'external' QUnit engine (which is called by clicking 'QUnit test (click to run)' context menu that is displayed if you hit circle left to the QUnit test).
But if I use assert in another way:
notOk(condition.isFalse());
Then tests are run well only inside of Visual Studio tests system, while attempt to run tests by QUnit give following error:
Died on test #1 at http://localhost:64720/Tests.js:123:1: notOk is not defined
Source:
ReferenceError: notOk is not defined
at Object.<anonymous> (http://localhost:64720/Tests.js:129:5)
at Object.Test.run (http://localhost:64720/qunit.js:790:18)
at http://localhost:64720/qunit.js:877:10
at process (http://localhost:64720/qunit.js:593:24)
at http://localhost:64720/qunit.js:182:5
Why does this happen and how to make "notOk" running properly by QUnit?
Thank you.