From 3c8b1bed83368fba3f807dc6d2d47c3682b3c4d9 Mon Sep 17 00:00:00 2001 From: Emily Marigold Klassen Date: Fri, 22 Sep 2017 17:31:42 -0700 Subject: [PATCH] Add `t.title` to TypeScript definitions (#1529) --- index.js.flow | 1 + types/base.d.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/index.js.flow b/index.js.flow index 136ebc569..753b47e49 100644 --- a/index.js.flow +++ b/index.js.flow @@ -81,6 +81,7 @@ type AssertContext = { */ type TestContext = AssertContext & { + title: string; plan(count: number): void; skip: AssertContext; }; diff --git a/types/base.d.ts b/types/base.d.ts index b23afa0af..b8e2aa9b3 100644 --- a/types/base.d.ts +++ b/types/base.d.ts @@ -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.