You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Is your feature request related to a problem? Please describe.
Stubbing multiple properties require to write the var name multiple times, for example:
Describe the solution you'd like
It'd be nice to have a shortcut syntax to provide optional overrides for createStubInstance, for example:
Describe alternatives you've considered
The same result could be achieved with "with":
"with" expression, however, is marked as deprecated and probably it's not the best idea to use it.
Another alternative I thought about was to provide functions to give more flexibility:
The version above would be easier to reuse. For example, sometimes we use fluent interfaces:
Could have even shorter syntax:
The text was updated successfully, but these errors were encountered: