import { Output, SourceDirectory, SourceFile } from "@alloy-js/core"; import { d } from "@alloy-js/core/testing"; import { expect, it } from "vitest"; import * as ts from "../src/components/index.js"; it("exports everything from source files within it", () => { expect( , ).toRenderTo({ "components/index.ts": d` export * from "./c1.js"; export * from "./c2.js"; `, "index.ts": d` export * from "./test1.js"; export * from "./test2.js"; export * from "./components/index.js"; `, "components/c2.ts": "", "components/c1.ts": "", "test1.ts": "", "test2.ts": "", }); }); it("ignores non-TS files", () => { expect( , ).toRenderTo({ "index.ts": d` export * from "./test1.js"; export * from "./test2.js"; `, "test.txt": "", "test1.ts": "", "test2.ts": "", }); });