import { MockBuilder } from "https://deno.land/x/rhum@v2.0.0/src/mock/mock_builder.ts";
Builder to help build a mock object. This does all of the heavy-lifting to
create a mock object. Its create()
method returns an instance of Mock
,
which is basically an original object with added data members for verifying
behavior.
Constructors
new
MockBuilder(constructorFn: Constructor<ClassToMock>)Construct an object of this class.
Methods
create(): ClassToMock & IMock<ClassToMock>
Create the mock object.
withConstructorArgs(...args: unknown[]): this
Before constructing the mock object, track any constructor function args that need to be passed in when constructing the mock object.