According to the documentation:
The most basic statement in QUnit, ok () requires only one argument. If the argument evaluates to true, the statement passes; otherwise fails.
You can verify that the method returns false by writing an expression that evaluates to true if the method returns false , and vice versa. The simplest expression for this is the NOT operator, which in JavaScript is expressed through !
test( "Test method returns false ", function() { ok( method() == false, "Method returned false" );
source share