Remove console logs in fourslash (#18803)

This commit is contained in:
Wesley Wigham 2017-09-27 11:49:14 -07:00 committed by GitHub
parent 6ffee104ca
commit d407f14e86

View file

@ -1037,8 +1037,7 @@ namespace FourSlash {
const refs = this.getReferencesAtCaret(); const refs = this.getReferencesAtCaret();
if (refs && refs.length) { if (refs && refs.length) {
console.log(refs); this.raiseError(`Expected getReferences to fail, but saw references: ${stringify(refs)}`);
this.raiseError("Expected getReferences to fail");
} }
} }
@ -1050,9 +1049,9 @@ namespace FourSlash {
private assertObjectsEqual<T>(fullActual: T, fullExpected: T, msgPrefix = ""): void { private assertObjectsEqual<T>(fullActual: T, fullExpected: T, msgPrefix = ""): void {
const recur = <U>(actual: U, expected: U, path: string) => { const recur = <U>(actual: U, expected: U, path: string) => {
const fail = (msg: string) => { const fail = (msg: string) => {
console.log("Expected:", stringify(fullExpected)); this.raiseError(`${msgPrefix} At ${path}: ${msg}
console.log("Actual: ", stringify(fullActual)); Expected: ${stringify(fullExpected)}
this.raiseError(`${msgPrefix}At ${path}: ${msg}`); Actual: ${stringify(fullActual)}`);
}; };
if ((actual === undefined) !== (expected === undefined)) { if ((actual === undefined) !== (expected === undefined)) {
@ -1084,9 +1083,9 @@ namespace FourSlash {
if (fullActual === fullExpected) { if (fullActual === fullExpected) {
return; return;
} }
console.log("Expected:", stringify(fullExpected)); this.raiseError(`${msgPrefix}
console.log("Actual: ", stringify(fullActual)); Expected: ${stringify(fullExpected)}
this.raiseError(msgPrefix); Actual: ${stringify(fullActual)}`);
} }
recur(fullActual, fullExpected, ""); recur(fullActual, fullExpected, "");