UNPKG

winterspec

Version:

Write Winter-CG compatible routes with filesystem routing and tons of features

23 lines (22 loc) 734 B
import { ExecutionContext } from "ava"; import { Middleware } from "../../middleware/types.js"; export type GetTestServerOptions = { /** * Defaults to the current working directory. */ rootDirectory?: string; /** * Middleware that run before any other middleware. * This is often used for dependency injection. */ middleware?: Middleware[]; }; /** * Start a test dev server for AVA. This works in watch mode too! * Check out the [docs](https://github.com/tscircuit/winterspec/blob/main/docs/testing.md) for more information. * * @param t test context from AVA */ export declare const getTestServer: (t: ExecutionContext, options?: GetTestServerOptions) => Promise<{ port: number; }>;