# Testing

> Sign requests and mint sessions exactly as Storeware does, for your tests.

Source: https://storeware.ai/docs/sdk/testing

```ts
import { ... } from '@storeware/plugin-sdk/testing';
```

### signRequest

The `storeware-signature` header for a body, as Storeware would send it.

```ts
function signRequest(options: { secret: string; body: string; kind?: SignedRequestKind; timestampSeconds?: number; }): Promise<string>
```

### signedDelivery

A webhook delivery as a `Request`, signed for the shop's secret.

```ts
function signedDelivery(options: { secret: string; event: string; data?: unknown; storeId?: string; url?: string; }): Promise<Request>
```

### mintSession

A session token like the one the admin frames your home or panel with.

```ts
function mintSession(options: { secret: string; clientId: string; claims?: Partial<ExtensionSessionClaims>; ttlSeconds?: number; }): Promise<string>
```
