mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-08 11:53:15 -05:00
Ensure verify.noErrors tests json files
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// @strict: true
|
||||
|
||||
// @Filename: /node_modules/foo/bar.json
|
||||
////export const x = 0;
|
||||
////{ "a": 0 }
|
||||
|
||||
// @Filename: /a.ts
|
||||
////import abs = require([|"foo/bar.json"|]);
|
||||
|
||||
Reference in New Issue
Block a user