On this page
QUnit.push()
version added: 1.0.0
deprecated: 2.1.0
Description
QUnit.push( result, actual, expected, message )
Report the result of a custom assertion.
This method is deprecated and it’s recommended to use pushResult in the assertion context instead.
| name | description |
|---|---|
result (boolean) |
Result of the assertion |
actual |
Expression being tested |
expected |
Known comparison value |
message (string) |
A short description of the assertion |
QUnit.push reflects to the current running test, and it may leak assertions in asynchronous mode. Checkout assert.pushResult() to set a proper custom assertion.
Invoking QUnit.push allows to create a readable expectation that is not defined by any of QUnit’s built-in assertions.
© OpenJS Foundation and contributors.
Licensed under the MIT license.
https://api.qunitjs.com/extension/QUnit.push