Ensure verify.noErrors tests json files

This commit is contained in:
Andy Hanson committed 2018-09-26 16:57:23 -07:00
1 parent 96f9e076f8
commit 7b1388b071
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -593,7 +593,8 @@ namespace FourSlash {
public verifyNoErrors() {
ts.forEachKey(this.inputFiles, fileName => {
if (!ts.isAnySupportedFileExtension(fileName)
|| !this.getProgram().getCompilerOptions().allowJs && !ts.extensionIsTS(ts.extensionFromPath(fileName))) return;
|| Harness.getConfigNameFromFileName(fileName)
|| !this.getProgram().getCompilerOptions().allowJs && !ts.resolutionExtensionIsTSOrJson(ts.extensionFromPath(fileName))) return;
const errors = this.getDiagnostics(fileName).filter(e => e.category !== ts.DiagnosticCategory.Suggestion);
if (errors.length) {
this.printErrorLog(/*expectErrors*/ false, errors);