From d407f14e8677cdaf370802ba00978a441aad02d2 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 27 Sep 2017 11:49:14 -0700 Subject: [PATCH] Remove console logs in fourslash (#18803) --- src/harness/fourslash.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 13db228e88..c2bab0a5a6 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -1037,8 +1037,7 @@ namespace FourSlash { const refs = this.getReferencesAtCaret(); if (refs && refs.length) { - console.log(refs); - this.raiseError("Expected getReferences to fail"); + this.raiseError(`Expected getReferences to fail, but saw references: ${stringify(refs)}`); } } @@ -1050,9 +1049,9 @@ namespace FourSlash { private assertObjectsEqual(fullActual: T, fullExpected: T, msgPrefix = ""): void { const recur = (actual: U, expected: U, path: string) => { const fail = (msg: string) => { - console.log("Expected:", stringify(fullExpected)); - console.log("Actual: ", stringify(fullActual)); - this.raiseError(`${msgPrefix}At ${path}: ${msg}`); + this.raiseError(`${msgPrefix} At ${path}: ${msg} +Expected: ${stringify(fullExpected)} +Actual: ${stringify(fullActual)}`); }; if ((actual === undefined) !== (expected === undefined)) { @@ -1084,9 +1083,9 @@ namespace FourSlash { if (fullActual === fullExpected) { return; } - console.log("Expected:", stringify(fullExpected)); - console.log("Actual: ", stringify(fullActual)); - this.raiseError(msgPrefix); + this.raiseError(`${msgPrefix} +Expected: ${stringify(fullExpected)} +Actual: ${stringify(fullActual)}`); } recur(fullActual, fullExpected, "");