Skip to content

Commit

Permalink
Reporters: add timestamp to log in describe() func (#360)
Browse files Browse the repository at this point in the history
When debugging tests case, having a timestamp on console outputs is
useful and would help developers to isolate timing issues.
This change was intended in MR318 but it was changing reporter.describe
and not reporter.write (which is called by canopy.describe).
  • Loading branch information
milkeg authored and lefthandedgoat committed Apr 11, 2017
1 parent e6cecfd commit 1553863
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/canopy/reporters.fs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ type ConsoleReporter() =
Console.WriteLine("{0} failed", failed)
Console.ResetColor()

member this.write w = Console.WriteLine w
member this.write text =
let now = DateTime.Now.ToString()
Console.WriteLine (sprintf "%s: %s" now text)

member this.suggestSelectors selector suggestions =
Console.ForegroundColor <- ConsoleColor.Yellow
Expand Down

0 comments on commit 1553863

Please sign in to comment.