* add test for the fix for overwrite emitting error

* cr feedback
This commit is contained in:
Zhengbo Li 2016-11-03 16:26:03 -07:00 committed by GitHub
parent 7d1f0e67b4
commit afe36be50c

View File

@ -2464,4 +2464,28 @@ namespace ts.projectSystem {
});
});
describe("No overwrite emit error", () => {
it("for inferred project", () => {
const f1 = {
path: "/a/b/f1.js",
content: "function test1() { }"
};
const host = createServerHost([f1, libFile]);
const session = createSession(host);
openFilesForSession([f1], session);
const projectService = session.getProjectService();
checkNumberOfProjects(projectService, { inferredProjects: 1 });
const projectName = projectService.inferredProjects[0].getProjectName();
const diags = session.executeCommand(<server.protocol.CompilerOptionsDiagnosticsRequest>{
type: "request",
command: server.CommandNames.CompilerOptionsDiagnosticsFull,
seq: 2,
arguments: { projectFileName: projectName }
}).response;
assert.isTrue(diags.length === 0);
});
});
}