# createScriptedClient (/docs/api/core-testing/functions/createScriptedClient)



```ts
function createScriptedClient(script): ScriptedClient;
```

Answers in call order. The gate is FIFO, so a script and a judged batch line up.
Failures reject rather than throw synchronously, as a real client does.

## Parameters [#parameters]

| Parameter | Type                                                                       |
| --------- | -------------------------------------------------------------------------- |
| `script`  | readonly [`ScriptStep`](/docs/api/core-testing/type-aliases/ScriptStep)\[] |

## Returns [#returns]

[`ScriptedClient`](/docs/api/core-testing/interfaces/ScriptedClient)
