microsoft/typespec
Publicmirrored from https://github.com/microsoft/typespecAvailable
packages/events/test/test-host.ts
13lines · modecode
| 1 | import { createTestHost, createTestWrapper } from "@typespec/compiler/testing"; |
| 2 | import { EventsTestLibrary } from "../src/testing/index.js"; |
| 3 | |
| 4 | export async function createEventsTestHost() { |
| 5 | return createTestHost({ |
| 6 | libraries: [EventsTestLibrary], |
| 7 | }); |
| 8 | } |
| 9 | |
| 10 | export async function createEventsTestRunner() { |
| 11 | const host = await createEventsTestHost(); |
| 12 | return createTestWrapper(host, { autoUsings: ["TypeSpec.Events"] }); |
| 13 | } |
| 14 | |