Skip to content

Commit

Permalink
Add t.title to TypeScript definitions (#1529)
Browse files Browse the repository at this point in the history
  • Loading branch information
forivall authored and kevva committed Sep 23, 2017
1 parent 1423878 commit 3c8b1be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ type AssertContext = {
*/

type TestContext = AssertContext & {
title: string;
plan(count: number): void;
skip: AssertContext;
};
Expand Down
4 changes: 4 additions & 0 deletions types/base.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ export interface AssertContext {
ifError(error: any, message?: string): void;
}
export interface TestContext extends AssertContext {
/**
* Test title.
*/
title: string;
/**
* Plan how many assertion there are in the test.
* The test will fail if the actual assertion count doesn't match planned assertions.
Expand Down

0 comments on commit 3c8b1be

Please sign in to comment.