diff --git a/src/testRunner/unittests/projectReferences.ts b/src/testRunner/unittests/projectReferences.ts index 53fcd4a9dd0..5b99e01585d 100644 --- a/src/testRunner/unittests/projectReferences.ts +++ b/src/testRunner/unittests/projectReferences.ts @@ -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": {