Merge pull request #30513 from ericfreese/fix-code-expect-arrays

@types/code: Fix `equal` when comparing arrays
This commit is contained in:
Benjamin Lichtman
2018-11-20 08:18:37 -08:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -103,6 +103,7 @@ expect("abcd").to.have.length(4);
expect(5).to.equal(5);
expect({ a: 1 }).to.equal({ a: 1 });
expect([1, 2, 3]).to.equal([1, 2, 3]);
expect(Object.create(null)).to.equal({}, { prototype: false });
+2 -2
View File
@@ -125,9 +125,9 @@ export interface Values<T> {
/** Asserts that the reference value has a length property matching the provided size or an object with the specified number of keys. */
length(size: number): AssertionChain<T>;
/** Asserts that the reference value equals the provided value. */
equal(value: T, options?: any): AssertionChain<T>;
equal(value: T | T[], options?: any): AssertionChain<T>;
/** Asserts that the reference value equals the provided value. */
equals(value: T, options?: any): AssertionChain<T>;
equals(value: T | T[], options?: any): AssertionChain<T>;
/** Asserts that the reference value is greater than (>) the provided value. */
above(value: T): AssertionChain<T>;
/** Asserts that the reference value is greater than (>) the provided value. */