fix(language-service): make link check pass

This commit is contained in:
vsavkin 2016-11-23 16:21:06 -08:00
parent 2a3ca7bfcf
commit 7194fc2b9e
2 changed files with 3 additions and 3 deletions

View File

@ -96,7 +96,7 @@ describe('completions', () => {
} }
} catch (e) { } catch (e) {
// Emit enough diagnostic information to reproduce the error. // Emit enough diagnostic information to reproduce the error.
console.log( console.error(
`Position: ${position}\nContent: "${mockHost.getFileContent(fileName)}"\nStack:\n${e.stack}`); `Position: ${position}\nContent: "${mockHost.getFileContent(fileName)}"\nStack:\n${e.stack}`);
throw e; throw e;
} }

View File

@ -255,9 +255,9 @@ function expectNoDiagnostics(diagnostics: ts.Diagnostic[]) {
let message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); let message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
if (diagnostic.start) { if (diagnostic.start) {
let {line, character} = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start); let {line, character} = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
console.log(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`); console.error(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
} else { } else {
console.log(`${message}`); console.error(`${message}`);
} }
} }
expect(diagnostics.length).toBe(0); expect(diagnostics.length).toBe(0);