From 5c6cf19753f741ac12a82fe98123a16d91f80ad3 Mon Sep 17 00:00:00 2001 From: Danny Arnold Date: Wed, 8 Feb 2017 16:51:17 +0100 Subject: [PATCH 1/2] add definition for snapshot assertion --- types/base.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/base.d.ts b/types/base.d.ts index 78884fbaf..2fcfbdc85 100644 --- a/types/base.d.ts +++ b/types/base.d.ts @@ -71,6 +71,10 @@ export interface AssertContext { * Assert that contents matches regex. */ regex(contents: string, regex: RegExp, message?: string): void; + /** + * Assert that contents matches a snapshot. + */ + snapshot(contents: any): void; /** * Assert that contents does not match regex. */ From 90a096655da91612c185fa5dde5b822276993432 Mon Sep 17 00:00:00 2001 From: Danny Arnold Date: Thu, 9 Feb 2017 20:19:38 +0100 Subject: [PATCH 2/2] add optional message to snapshot typescript definition --- types/base.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/base.d.ts b/types/base.d.ts index 2fcfbdc85..a619b71c2 100644 --- a/types/base.d.ts +++ b/types/base.d.ts @@ -74,7 +74,7 @@ export interface AssertContext { /** * Assert that contents matches a snapshot. */ - snapshot(contents: any): void; + snapshot(contents: any, message?: string): void; /** * Assert that contents does not match regex. */