Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Stub Typescript definition should allow functions that receive arguments. #283

Open
ryandagg opened this issue Nov 8, 2022 · 0 comments

Comments

@ryandagg
Copy link

ryandagg commented Nov 8, 2022

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];
};
@ryandagg ryandagg changed the title Stub should allow functions that receive arguments. Stub Typescript definition should allow functions that receive arguments. Nov 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant