diff --git a/packages/definitions-parser/test/module-info.test.ts b/packages/definitions-parser/test/module-info.test.ts index 62797f9276..316e91f80c 100644 --- a/packages/definitions-parser/test/module-info.test.ts +++ b/packages/definitions-parser/test/module-info.test.ts @@ -62,6 +62,19 @@ testo({ expect(Array.from(types.keys())).toEqual(["merges.d.ts"]); expect(Array.from(tests.keys())).toEqual(["globby-tests.ts", "test/other-tests.ts"]); }, + allReferencedFilesIncludesRelativeTypeReferences() { + const pkg = new Dir(undefined); + pkg.set( + "mock-tests.ts", + `/// +` + ); + pkg.set("addon.pdf.d.ts", ""); + const memFS = new InMemoryFS(pkg, "types/mock"); + const { types, tests } = allReferencedFiles(["mock-tests.ts"], memFS, "mock", "types/mock"); + expect(Array.from(types.keys())).toEqual(["addon.pdf.d.ts"]); + expect(Array.from(tests.keys())).toEqual(["mock-tests.ts"]); + }, getModuleInfoWorksWithOtherFiles() { const { types } = getBoringReferences(); // written as if it were from OTHER_FILES.txt