import { Output, refkey } 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("using refkey that is missing declration show info about it", () => {
const key = refkey("foo");
expect(
,
// cspell:ignore sfoo
).toRenderTo(``);
});
it("works with back references", () => {
expect(
,
).toRenderTo({
"test1.ts": `
const foo = 1;
`,
"test2.ts": `
import { foo } from "./test1.js";
const v = foo;
`,
});
});
it("works with forward references", () => {
expect(
,
).toRenderTo({
"test1.ts": `
const foo = 1;
`,
"test2.ts": `
import { foo } from "./test1.js";
const v = foo;
`,
});
});