import { List, Output, refkey, SourceFile } from "@alloy-js/core"; import { expect, it } from "vitest"; import * as ts from "../src/components/index.js"; import { Reference } from "../src/components/Reference.js"; it("works", () => { const fnSpec = { greeting: "Hello", farewell: "Goodbye", }; const greetKey = refkey(fnSpec, "greet"); const farewellKey = refkey(fnSpec, "farewell"); expect( This is a sample output project. console.log("Hello world!"); console.log( ("world")); console.log( ("world")); return "{fnSpec.greeting} " + str; return "{fnSpec.farewell} " + str; , ).toRenderTo({ "readme.md": `This is a sample output project.`, "index.ts": `console.log("Hello world!");`, "test1.ts": ` function sayHello(str: string) { return "Hello " + str; } function sayGoodbye(str: string) { return "Goodbye " + str; } `, "test2.ts": ` import { sayGoodbye, sayHello } from "./test1.js"; console.log(sayHello("world")); console.log(sayGoodbye("world")); `, }); });