edgespec
Version:
Write Winter-CG compatible routes with filesystem routing and tons of features
29 lines (26 loc) • 841 B
text/typescript
import { ExecutionContext } from 'ava';
import { M as Middleware } from '../../edge-spec-CQZ1EUiH.cjs';
import 'type-fest';
import 'zod';
import 'openapi3-ts/oas31';
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/seamapi/edgespec/blob/main/docs/testing.md) for more information.
*
* @param t test context from AVA
*/
declare const getTestServer: (t: ExecutionContext, options?: GetTestServerOptions) => Promise<{
port: number;
}>;
export { type GetTestServerOptions, getTestServer };