Skip to content

Lupa API Reference / network/types / NetworkMockOptions

Interface: NetworkMockOptions ​

Defined in: src/network/types.ts:82

The configuration object used to register a new network mock.

Properties ​

match ​

match: NetworkMatch

Defined in: src/network/types.ts:84

The criteria used to match requests against this mock.


respond ​

respond: NetworkRespondPayload | NetworkRespondDynamic

Defined in: src/network/types.ts:86

The static payload or dynamic closure used to fulfill the matched request.


times? ​

optional times?: number

Defined in: src/network/types.ts:91

The number of times this mock should intercept a request before expiring. If omitted, the mock persists for the lifetime of the test unless explicitly restored.