Skip to content

Conversation

@domasx2
Copy link
Contributor

@domasx2 domasx2 commented Mar 24, 2019

Partially fixes shortcomings of my previous PR:

  • Multiple return values can be set up If Argument is not used for matching arguments
  • Multiple return values can be set up if Argument is used for every setup
  • Multiple return values cannot be set up if some matchers use Argument, some dont :(
  • If not return values set up for invocation, it returns a proxy object and not void

It's not clean, but not really worse than before my PRs. Best I could figure out :(
The limitation is because when invoking a method there is no way to tell if user intends to set up return value, I see no reasonable way to work around it without changing API to smth more resembling typemoq...

what do you think @ffMathy ?

@ffMathy
Copy link
Owner

ffMathy commented Mar 24, 2019

Keep up the good work! Can we get even closer?

@ffMathy ffMathy merged commit d6556c3 into ffMathy:master Mar 24, 2019
Karql added a commit to Karql/FluffySpoon.JavaScript.Testing.Faking that referenced this pull request Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants