From 17088c66d97e5ae44fce861f30f544922e610b08 Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Sat, 17 Dec 2016 20:37:07 +0800 Subject: [PATCH] reporters: add timestamp to log in describe() func 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. --- src/canopy/reporters.fs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/canopy/reporters.fs b/src/canopy/reporters.fs index 82f4df89..0b1e2e51 100644 --- a/src/canopy/reporters.fs +++ b/src/canopy/reporters.fs @@ -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))