For testing asynchronous code, QUnit.asyncTest
will automatically stop the test runner and wait for your code to call QUnit.start()
to continue.
The assert
argument to the callback contains all of QUnit's assertion methods. Use this argument to call your test assertions.
This method used to have an optional second argument called expected
. This argument is deprecated and its usage will start throwing errors in 2.0.0. If you're using it, use expect()
instead.
When testing the most common, synchronous code, use QUnit.test()
The assert
argument to the callback contains all of QUnit's assertion methods. You should use this argument to call your test assertions
The assert
argument to the callback contains all of QUnit's assertion methods. Use this argument to call your test assertions.
This method used to have an optional second argument called expected
. This argument is deprecated and its usage will start throwing errors in 2.0.0. If you're using it, use expect()
instead.