import { List } from "@alloy-js/core";
import { expect, it } from "vitest";
import { TestFile } from "../../../test/utils.jsx";
import {
InterfaceDeclaration,
InterfaceExpression,
InterfaceMember,
} from "../Interface.jsx";
it("render expression", () => {
expect(
,
).toRenderTo(`
{
foo: string
}
`);
});
it("render nested", () => {
expect(
,
).toRenderTo(`
{
foo: {
bar: string
}
}
`);
});
it("separate expressions don't conflict in name", () => {
expect(
,
).toRenderTo(`
{
bar: string
}
{
bar: string
}
`);
});
it("separate expressions when in interface declaration", () => {
expect(
,
).toRenderTo(`
interface Test {
foo: {
bar: string
} | {
bar: string
}
}
`);
});