Skip to content

Commit d169f0e

Browse files
zs-zsnovemberborn
authored andcommitted
Fix context for beforeEach and afterEach hooks in Flow type definition file (#1344)
1 parent bd81ef4 commit d169f0e

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

index.js.flow

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ declare module.exports: {
187187
( run: ContextualTest): void;
188188
(name: string, run: ContextualTest): void;
189189

190-
beforeEach : TestMethod;
191-
afterEach : TestMethod;
190+
beforeEach : ContextualTestMethod;
191+
afterEach : ContextualTestMethod;
192192
serial : ContextualTestMethod;
193193
before : ContextualTestMethod;
194194
after : ContextualTestMethod;

test/flow-types/regression-1114.js.flow

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ test.cb(t => {
2626
});
2727

2828
test.beforeEach(t => {
29-
// $ExpectError: Unknown property "context"
3029
const context = t.context;
3130
})
3231

0 commit comments

Comments
 (0)