import { expect, it } from "vitest"; import * as ts from "../src/index.js"; import { TestFile } from "./utils.js"; it("renders a variable declaration with documentation", () => { const res = ( 123 ; ); expect(res).toRenderTo(` /** * This is a variable documentation */ const myVar = 123; `); }); it("renders a let declaration with documentation", () => { const res = ( 0 ; ); expect(res).toRenderTo(` /** * A counter variable that can be changed */ let counter: number = 0; `); }); it("renders an exported variable declaration with documentation", () => { const res = ( "https://api.example.com" ; ); expect(res).toRenderTo(` /** * The base URL for API calls */ export const API_URL: string = "https://api.example.com"; `); });