Skip to content

Commit

Permalink
Add test for #11980 (#12027)
Browse files Browse the repository at this point in the history
* add test for the fix for overwrite emitting error

* cr feedback
  • Loading branch information
zhengbli committed Nov 3, 2016
1 parent 7d1f0e6 commit afe36be
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/harness/unittests/tsserverProjectSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
}

0 comments on commit afe36be

Please sign in to comment.