Skip to content

Commit

Permalink
Add after.always and afterEach.always runners to type definitions (
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd authored and jamestalmage committed May 27, 2016
1 parent c740202 commit 2e98438
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions index.d.ts
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@ export interface Runner {
skip: Runner; skip: Runner;
cb: CallbackRunner; cb: CallbackRunner;
} }
export interface AfterRunner extends Runner {
always: Runner;
}
export interface ContextualRunner { export interface ContextualRunner {
(name: string, run: ContextualTest): void; (name: string, run: ContextualTest): void;
(run: ContextualTest): void; (run: ContextualTest): void;
skip: ContextualRunner; skip: ContextualRunner;
cb: ContextualCallbackRunner; cb: ContextualCallbackRunner;
} }
export interface ContextualAfterRunner extends ContextualRunner {
always: ContextualRunner;
}
export interface SerialRunner { export interface SerialRunner {
(name: string, run: SerialTest): void; (name: string, run: SerialTest): void;
(run: SerialTest): void; (run: SerialTest): void;
Expand All @@ -46,9 +52,9 @@ export function test(name: string, run: ContextualTest): void;
export function test(run: ContextualTest): void; export function test(run: ContextualTest): void;
export namespace test { export namespace test {
export const before: Runner; export const before: Runner;
export const after: Runner; export const after: AfterRunner;
export const beforeEach: ContextualRunner; export const beforeEach: ContextualRunner;
export const afterEach: ContextualRunner; export const afterEach: ContextualAfterRunner;


export const skip: typeof test; export const skip: typeof test;
export const only: typeof test; export const only: typeof test;
Expand Down

0 comments on commit 2e98438

Please sign in to comment.