UNPKG

@japa/api-client

Version:

Browser and API testing client for Japa. Built on top of Playwright

18 lines (17 loc) 515 B
import type { PluginFn } from '@japa/runner/types'; import { ApiClient } from './src/client.js'; export { ApiClient }; export { ApiRequest } from './src/request.js'; export { ApiResponse } from './src/response.js'; /** * API client plugin registers an HTTP request client that * can be used for testing API endpoints. */ export declare function apiClient(options?: string | { baseURL?: string; }): PluginFn; declare module '@japa/runner/core' { interface TestContext { client: ApiClient; } }