UNPKG

@typespec/compiler

Version:

TypeSpec compiler and standard library

37 lines 1.66 kB
import { CompilerOptions } from "../core/options.js"; import type { Type } from "../core/types.js"; import { BasicTestRunner, TestHost, TypeSpecTestLibrary, TypeSpecTestLibraryInit } from "./types.js"; export declare function resolveVirtualPath(path: string, ...paths: string[]): string; /** Find the package root from the provided file * @deprecated Use {@link createTester} instead */ export declare function findTestPackageRoot(fileUrl: string): Promise<string>; /** * Define a test library defaulting to the most common library structure. * @param init Library configuration. * @returns TypeSpec Test library. * @deprecated Use {@link createTester} instead */ export declare function createTestLibrary(init: TypeSpecTestLibraryInit): TypeSpecTestLibrary; /** @deprecated Use {@link Tester} instead */ export interface TestWrapperOptions { wrapper?: (code: string) => string; /** * List of imports to include automatically. */ autoImports?: string[]; /** * List of usings to include automatically. */ autoUsings?: string[]; compilerOptions?: CompilerOptions; } /** @deprecated Use {@link createTester} instead */ export declare function createTestWrapper(host: TestHost, testWrapperOptions?: TestWrapperOptions): BasicTestRunner; export declare function trimBlankLines(code: string): string; /** * Compare 2 TypeSpec type and make sure they are the exact same(a === b). * Show a better diff than just having ok(a===b) while not crashing like strictEqual/expect.toEqual */ export declare function expectTypeEquals(actual: Type | undefined, expected: Type): void; //# sourceMappingURL=test-utils.d.ts.map