Skip to content

Commit

Permalink
Add TS types for t.snapshot(content, options)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajafff authored and novemberborn committed Jan 8, 2018
1 parent c1faf95 commit 29e5dfd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions types/base.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export type ErrorValidator
export interface Observable {
subscribe(observer: (value: {}) => void): void;
}
export interface SnapshotOptions {
id?: string;
}
export type Test = (t: TestContext) => PromiseLike<void> | Iterator<any> | Observable | void;
export type GenericTest<T> = (t: GenericTestContext<T>) => PromiseLike<void> | Iterator<any> | Observable | void;
export type CallbackTest = (t: CallbackTestContext) => void;
Expand Down Expand Up @@ -78,6 +81,7 @@ export interface AssertContext {
* Assert that contents matches a snapshot.
*/
snapshot(contents: any, message?: string): void;
snapshot(contents: any, options: SnapshotOptions, message?: string): void;
/**
* Assert that contents does not match regex.
*/
Expand Down

0 comments on commit 29e5dfd

Please sign in to comment.