Fix test case for project reference with composite not true

This commit is contained in:
Sheetal Nandi
2018-10-30 18:59:25 -07:00
parent 60801a261c
commit 305303cc0d

View File

@@ -147,7 +147,10 @@ namespace ts {
},
"/reference": {
files: { "/secondary/b.ts": moduleImporting("../primary/a") },
references: ["../primary"]
references: ["../primary"],
config: {
files: ["b.ts"]
}
}
};
testProjectReferences(spec, "/reference/tsconfig.json", program => {
@@ -156,6 +159,26 @@ namespace ts {
});
});
it("does not error when the referenced project doesn't have composite:true if its a container project", () => {
const spec: TestSpecification = {
"/primary": {
files: { "/primary/a.ts": emptyModule },
references: [],
options: {
composite: false
}
},
"/reference": {
files: { "/secondary/b.ts": moduleImporting("../primary/a") },
references: ["../primary"],
}
};
testProjectReferences(spec, "/reference/tsconfig.json", program => {
const errs = program.getOptionsDiagnostics();
assertNoErrors("Reports an error about 'composite' not being set", errs);
});
});
it("errors when the file list is not exhaustive", () => {
const spec: TestSpecification = {
"/primary": {