Packages@robojs/server
TestRouteOptions
Interface: TestRouteOptions
Options for testing a route module
Extends
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
baseUrl? | string | Base URL for constructing absolute URLs (defaults to 'http://localhost:3000') | TestRequestOptions.baseUrl |
body? | unknown | Request body (will be JSON stringified if object) | TestRequestOptions.body |
forceHandler? | | "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD" | "default" | Override method detection and call a specific handler | - |
headers? | Record<string, string> | Request headers | TestRequestOptions.headers |
method? | "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD" | HTTP method (defaults to 'GET') | TestRequestOptions.method |
params? | Record<string, string> | URL parameters extracted from dynamic segments like [id] | TestRequestOptions.params |
path? | string | URL path (defaults to '/test') | TestRequestOptions.path |
query? | Record<string, string | string[]> | Query string parameters | TestRequestOptions.query |
