mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-20 21:22:28 -05:00
Fix test case for project reference with composite not true
This commit is contained in:
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user