microsoft/typespec
Publicmirrored from https://github.com/microsoft/typespecAvailable
packages/html-program-viewer/test/smoke-test.test.ts
19lines · modecode
| 1 | import { BasicTestRunner } from "@typespec/compiler/testing"; |
| 2 | import { beforeEach, describe, it } from "vitest"; |
| 3 | import { createViewerTestRunner } from "./test-host.js"; |
| 4 | |
| 5 | describe("html-program-viewer: smoke tests", () => { |
| 6 | let runner: BasicTestRunner; |
| 7 | |
| 8 | beforeEach(async () => { |
| 9 | runner = await createViewerTestRunner(); |
| 10 | }); |
| 11 | |
| 12 | it("create html view", async () => { |
| 13 | await runner.compile(`op foo(): string;`); |
| 14 | }); |
| 15 | |
| 16 | it("compile unnamed union variant without error", async () => { |
| 17 | await runner.compile(`union Foo { "a", "b" }`); |
| 18 | }); |
| 19 | }); |
| 20 | |