mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 20:25:23 -06:00
Add test for https://github.com/Microsoft/TypeScript/pull/11980 (#12027)
* add test for the fix for overwrite emitting error * cr feedback
This commit is contained in:
parent
7d1f0e67b4
commit
afe36be50c
@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user