Skip to content

Commit 29e5dfd

Browse files
ajafffnovemberborn
authored andcommittedJan 8, 2018
Add TS types for t.snapshot(content, options)
1 parent c1faf95 commit 29e5dfd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎types/base.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ export type ErrorValidator
77
export interface Observable {
88
subscribe(observer: (value: {}) => void): void;
99
}
10+
export interface SnapshotOptions {
11+
id?: string;
12+
}
1013
export type Test = (t: TestContext) => PromiseLike<void> | Iterator<any> | Observable | void;
1114
export type GenericTest<T> = (t: GenericTestContext<T>) => PromiseLike<void> | Iterator<any> | Observable | void;
1215
export type CallbackTest = (t: CallbackTestContext) => void;
@@ -78,6 +81,7 @@ export interface AssertContext {
7881
* Assert that contents matches a snapshot.
7982
*/
8083
snapshot(contents: any, message?: string): void;
84+
snapshot(contents: any, options: SnapshotOptions, message?: string): void;
8185
/**
8286
* Assert that contents does not match regex.
8387
*/

0 commit comments

Comments
 (0)
Please sign in to comment.