Permalink
Browse files

Add t.log() for Flow and TypeScript (#1538)

Fixes #1498.
  • Loading branch information...
Couto authored and novemberborn committed Oct 1, 2017
1 parent 8955e15 commit 64b7755d97cba07ed62d797c6ce2f85ffa11a01e
Showing with 5 additions and 0 deletions.
  1. +1 −0 index.js.flow
  2. +4 −0 types/base.d.ts
View
@@ -84,6 +84,7 @@ type TestContext = AssertContext & {
title: string;
plan(count: number): void;
skip: AssertContext;
log(message: string): void;
};
type ContextualTestContext = TestContext & { context: any; };
type ContextualCallbackTestContext = TestContext & { context: any; end(): void; };
View
@@ -99,6 +99,10 @@ export interface TestContext extends AssertContext {
plan(count: number): void;
skip: AssertContext;
/**
* Print a log message contextually alongside the test result instead of immediately printing it to stdout like console.log.
*/
log(message: string): void;
}
export interface CallbackTestContext extends TestContext {
/**

0 comments on commit 64b7755

Please sign in to comment.