# `H.Provider.Fake`
[🔗](https://github.com/parlant/harness/blob/v0.3.0/lib/h/provider/fake.ex#L1)

Deterministic scripted `H.Provider` for `--no-start` unit and recovery tests.

Steps in `script: [...]` are consumed strictly in FIFO order. Any call to
`stream_turn/3` when the script queue is exhausted raises
`H.Provider.Fake.UnscriptedRequestError` (or returns an error if
`on_unscripted: :error` is configured) rather than repeating an earlier answer.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `push_step`

```elixir
@spec push_step(GenServer.server(), term()) :: :ok
```

Appends a step to the script queue.

# `remaining`

```elixir
@spec remaining(GenServer.server()) :: [term()]
```

Returns the remaining scripted steps.

# `requests`

```elixir
@spec requests(GenServer.server()) :: [map()]
```

Returns all requests passed to `stream_turn/3` in arrival order.

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
