# @askrjs/server/testing

> Published API exports for @askrjs/server/testing.

Source: [https://askrjs.com/docs/reference/api/server/testing](https://askrjs.com/docs/reference/api/server/testing)

Status: stable. Packages: @askrjs/server/testing.

**Published packages are authoritative.** Examples may lag behind a published contract. When guidance differs, verify the exports and TypeScript declarations in your installed package, then file an issue.

## Exports

This entrypoint publishes 6 exports from the declarations shipped by @askrjs/server.

### `AdapterConformanceError`

```ts
AdapterConformanceError: typeof AdapterConformanceError
```

A failed adapter-conformance guarantee with a stable machine-readable {@link code}.

- `code`: readonly code: AdapterConformanceErrorCode;

- `name`: readonly name = "AdapterConformanceError";

### `AdapterConformanceErrorCode`

```ts
AdapterConformanceErrorCode: "STREAM_EXERCISE_FAILED" | "STREAM_EXERCISE_TIMEOUT" | "STREAM_CANCELLATION_TIMEOUT" | "REQUEST_TIMEOUT_EXERCISE_FAILED" | "REQUEST_TIMEOUT_ENFORCEMENT_TIMEOUT"
```

Stable diagnostic codes produced by {@link runAdapterConformance}.

### `AdapterConformanceExercises`

```ts
AdapterConformanceExercises: any
```

Real-transport exercises supplied by an adapter's integration test.

- `abortStreamingResponse`: Write the supplied infinite response through the real adapter, observe a client chunk,
then close/reset the client. Resolve after the transport disconnect is observed.

- `enforceRequestTimeout`: Run the supplied body-reading app through the real adapter with finite request/header
timeouts, send an incomplete request, and resolve after the transport terminates it.

### `AdapterConformanceOptions`

```ts
AdapterConformanceOptions: any
```

Options for {@link runAdapterConformance}.

- `deadlineMs`: Per-exercise deadline in milliseconds. Defaults to 1,000.

### `AdapterConformanceReport`

```ts
AdapterConformanceReport: any
```

Frozen success result returned by {@link runAdapterConformance}.

- `streamingResponseCancellation`: readonly streamingResponseCancellation: "passed";

- `incompleteRequestTimeout`: readonly incompleteRequestTimeout: "passed";

### `runAdapterConformance`

```ts
runAdapterConformance: (exercises: AdapterConformanceExercises, options?: AdapterConformanceOptions) => Promise<Readonly<AdapterConformanceReport>>
```

Runs reusable adapter guardrails against real-transport exercises supplied by the adapter.
Validation errors throw synchronously; runtime failures reject with {@link AdapterConformanceError}.
Exercise callbacks must honor the cleanup signal and close any sockets/servers they own.

## Documentation navigation

[Previous](https://askrjs.com/docs/reference/api/server/mcp/index.md) | [Next](https://askrjs.com/docs/reference/api/testing/root/index.md)
