Interface IMockOptions<T>

Mock instance options. Could be passed as parameter on mock instantiating or could be set globally on options.

Type Parameters

  • T

Hierarchy

  • IMockOptions

Properties

injectorConfig?: IInjectorConfig

The Mock internally based on angular injector to construct its dependencies. An instance of IInjectorConfig implementation could be passed as parameter in order to change the mock behaviour. The default value is an instance of DefaultInjectorConfig. There is also EqualMatchingInjectorConfig that would set up Mock to use equal logic for comparing values.

name?: string

You can name the mock. The name will be displayed with any relative output, so you can easily distinct output of several mocks. On the mocked object you can find this name at 'mockName' property of the [[Handler]].

target?: T

The target object for Proxy that is used under the hood. typeof operation is applied to this target. The default value is a function.

Generated using TypeDoc