Stub Typescript definition should allow functions that receive arguments.
ryandagg opened this issue · comments
Version 2.2.8.
Stub should allow functions that receive arguments so that passed arguments can be tested.
This is functionally correct but throws a Typescript error.
.stub(anObject, 'functionName', (argv: string[]) => {
expect(argv).is.eql(['some', 'thing'])
})
This should solve the issue:
stub: {
output: {
stubs: any[];
};
args: [object: any, path: any, value: (...args: any) => any];
};