Skip to content

Commit d407f14

Browse files
authored
Remove console logs in fourslash (#18803)
1 parent 6ffee10 commit d407f14

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/harness/fourslash.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,8 +1037,7 @@ namespace FourSlash {
10371037

10381038
const refs = this.getReferencesAtCaret();
10391039
if (refs && refs.length) {
1040-
console.log(refs);
1041-
this.raiseError("Expected getReferences to fail");
1040+
this.raiseError(`Expected getReferences to fail, but saw references: ${stringify(refs)}`);
10421041
}
10431042
}
10441043

@@ -1050,9 +1049,9 @@ namespace FourSlash {
10501049
private assertObjectsEqual<T>(fullActual: T, fullExpected: T, msgPrefix = ""): void {
10511050
const recur = <U>(actual: U, expected: U, path: string) => {
10521051
const fail = (msg: string) => {
1053-
console.log("Expected:", stringify(fullExpected));
1054-
console.log("Actual: ", stringify(fullActual));
1055-
this.raiseError(`${msgPrefix}At ${path}: ${msg}`);
1052+
this.raiseError(`${msgPrefix} At ${path}: ${msg}
1053+
Expected: ${stringify(fullExpected)}
1054+
Actual: ${stringify(fullActual)}`);
10561055
};
10571056

10581057
if ((actual === undefined) !== (expected === undefined)) {
@@ -1084,9 +1083,9 @@ namespace FourSlash {
10841083
if (fullActual === fullExpected) {
10851084
return;
10861085
}
1087-
console.log("Expected:", stringify(fullExpected));
1088-
console.log("Actual: ", stringify(fullActual));
1089-
this.raiseError(msgPrefix);
1086+
this.raiseError(`${msgPrefix}
1087+
Expected: ${stringify(fullExpected)}
1088+
Actual: ${stringify(fullActual)}`);
10901089
}
10911090
recur(fullActual, fullExpected, "");
10921091

0 commit comments

Comments
 (0)