From 09ceb2a45a790f8b90bcb7fe3a0fedcfcf805d85 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 11 Apr 2017 12:14:57 +0800 Subject: [PATCH] Reporters: add timestamp to log in describe() func 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). --- 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 c3fcbe03..7331cf57 100644 --- a/src/canopy/reporters.fs +++ b/src/canopy/reporters.fs @@ -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