microsoft/typespec

Public

mirrored from https://github.com/microsoft/typespecAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
61ba17d2d29dedf4553b21a055aa6b442a304688

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

packages/html-program-viewer/test/test-host.ts

17lines · modecode

1import { createTestHost, createTestWrapper } from "@typespec/compiler/testing";
2import { ProgramViewerTestLibrary } from "../src/testing/index.js";
3
4export async function createOpenAPITestHost() {
5 return createTestHost({
6 libraries: [ProgramViewerTestLibrary],
7 });
8}
9
10export async function createViewerTestRunner() {
11 const host = await createOpenAPITestHost();
12 return createTestWrapper(host, {
13 compilerOptions: {
14 emitters: { "@typespec/html-program-viewer": {} },
15 },
16 });
17}
18