Skip to content

Commit

Permalink
reporters: add timestamp to log in describe() func
Browse files Browse the repository at this point in the history
When debugging flaky tests that may be caused by timing
issues, it's handy to have a timestamp of everything that
was going on in the test when it failed.
  • Loading branch information
knocte committed Dec 17, 2016
1 parent 3493d30 commit 17088c6
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 @@ -55,7 +55,9 @@ type ConsoleReporter() =
Console.WriteLine(trace)
Console.ResetColor())

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

member this.contextStart c = Console.WriteLine (String.Format("context: {0}", c))

Expand Down

0 comments on commit 17088c6

Please sign in to comment.