From fa83f5bf0832e5be73b4b5e47635cf529584c73f Mon Sep 17 00:00:00 2001 From: Dobes Vandermeer Date: Wed, 27 Jun 2018 11:45:22 -0700 Subject: [PATCH] Add equals method to MatcherUtils See http://jestjs.io/docs/en/expect.html#thisequalsa-b > this.equals(a, b) > This is a deep-equality function that will return true if two objects have the same values (recursively). --- types/jest/index.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/jest/index.d.ts b/types/jest/index.d.ts index 432ba6f36f..10d3b5bf81 100644 --- a/types/jest/index.d.ts +++ b/types/jest/index.d.ts @@ -266,6 +266,10 @@ declare namespace jest { printWithType(name: string, received: any, print: (value: any) => string): string; stringify(object: {}, maxDepth?: number): string; }; + /** + * This is a deep-equality function that will return true if two objects have the same values (recursively). + */ + equals(a: any, b: any): boolean; } interface ExpectExtendMap {