mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 15:00:26 +00:00
Merge pull request #25876 from csantero/qunit-equiv
[qunit] Add QUnit.equiv
This commit is contained in:
Vendored
+8
@@ -595,6 +595,14 @@ interface QUnit {
|
||||
*/
|
||||
todo(name: string, callback?: (assert: Assert) => void): void;
|
||||
|
||||
/**
|
||||
* Compares two values. Returns true if they are equivalent.
|
||||
*
|
||||
* @param a The first value
|
||||
* @param b The second value
|
||||
*/
|
||||
equiv<T>(a: T, b: T): boolean;
|
||||
|
||||
/**
|
||||
* Are the test running from the server or not.
|
||||
*/
|
||||
|
||||
@@ -556,3 +556,9 @@ QUnit.test( "test with beforeEach and afterEach", function( assert ) {
|
||||
QUnit.todo( "a todo test", function( assert ) {
|
||||
assert.equal( 0, 1, "0 does not equal 1, so this todo should pass" );
|
||||
});
|
||||
|
||||
let equivResult: boolean;
|
||||
equivResult = QUnit.equiv({}, {});
|
||||
equivResult = QUnit.equiv(1, 2);
|
||||
equivResult = QUnit.equiv('foo', 'bar');
|
||||
equivResult = QUnit.equiv(['foo'], ['bar']);
|
||||
|
||||
Reference in New Issue
Block a user