builds a stub function
Optional
stub: RecursivePartial<T>Create a builder for a stub function of type T.
The builder contains two methods:
.with()
: adds additional handler or partial stub.
.create()
: creates the final stub function.
Creates the resulting stub function.
Optional
stub: RecursivePartial<T>Adds an init object or handler to the builder.
If init
is an object, it will be merged with the stub object.
If init
is a function, it will be called with the stub object.
The builder instance.
stub a value.
If the value is a function, it will be passed through as-is.
🦴
utilities