import { describe, it, expect } from "vitest"; import { emit } from "./test-host.js"; describe("hello", () => { it("emit output.txt with content hello world", async () => { const results = await emit(` namespace TestNamespace; @get() @route("/{param}") op test(@path param: string, @query foo?: integer): void;`); expect(results["routedTypemap_TestNamespace.ts"]).toMatchInlineSnapshot(` "/* eslint-disable */ /* * This file is automatically generated by typespec-typescript-emitter. * * You should not change or manipulate this file, as it will be overwritten. * Instead, change the underlying spec. */ export type types_TestNamespace = { ['/{param}']: { params: { param: string } queryParams: { foo?: number } request: null response: {status: 200, body: void} } }; " `); }); });