[**Documentation**](../../../../README)

***

[Documentation](../../../../README) / [@zerotal/testing](../../README) / [index](../README) / SessionDecoder

# Type Alias: SessionDecoder

> **SessionDecoder** = (`response`) => `Promise`\<`Record`\<`string`, `unknown`\> \| `null`\>

Defined in: [testing/src/TestResponse.ts:27](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/testing/src/TestResponse.ts#L27)

Decodes the session carried by a response, using the application's own
session driver. Returns `null` when the response sets no session cookie.

## Parameters

### response

`Response`

## Returns

`Promise`\<`Record`\<`string`, `unknown`\> \| `null`\>
