Allow tsconfig.json to be added to fourslash test.

This commit is contained in:
unknown
2015-07-16 23:33:42 -07:00
parent 6af52ee62f
commit 53e449c901
3 changed files with 17 additions and 4 deletions

View File

@@ -803,9 +803,6 @@ namespace ts.server {
} else {
this.log("no config file");
}
if (configFileName) {
configFileName = getAbsolutePath(configFileName, searchPath);
}
if (configFileName && (!this.configProjectIsActive(configFileName))) {
var configResult = this.openConfigFile(configFileName, fileName);
if (!configResult.success) {
@@ -910,7 +907,8 @@ namespace ts.server {
configFilename = ts.normalizePath(configFilename);
// file references will be relative to dirPath (or absolute)
var dirPath = ts.getDirectoryPath(configFilename);
var rawConfig: { config?: ProjectOptions; error?: Diagnostic; } = ts.readConfigFile(configFilename);
var contents = this.host.readFile(configFilename)
var rawConfig: { config?: ProjectOptions; error?: Diagnostic; } = ts.parseConfigFileText(configFilename, contents);
if (rawConfig.error) {
return rawConfig.error;
}

View File

@@ -0,0 +1,15 @@
/// <reference path="../fourslash.ts"/>
// @Filename: a.ts
////export var test = "test String"
// @Filename: b.ts
////export var test2 = "test String"
// @Filename: tsconfig.json
////{ "files": ["a.ts", "b.ts"] }
debugger;
goTo.file("a.ts")
verify.ProjectInfo(["lib.d.ts", "a.ts", "b.ts"])