Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Pendable resolvable after being called. #15

Merged
merged 10 commits into from
Apr 13, 2024
Merged

Conversation

younata
Copy link
Member

@younata younata commented Apr 13, 2024

Resolves #2

Pendable being static works, but is rather clunky.

This provides a safe way to allow you to resolve Pendable calls after they're made, instead of before.

Pendable now requires you to initialize it with a fallback (which isn't different from how it was before). This fallback is used when you re-stub a spy (it resolves any outstanding calls with the fallback value), or when some amount of time has passed after calling the spy.

A future PR will be written documentation describing exactly how to use Pendable.

  • Does this have tests?
  • Does this have documentation?
  • Does this break the public API (Requires major version bump)?
  • Is this a new feature (Requires minor version bump)?

@younata younata merged commit e962902 into main Apr 13, 2024
8 checks passed
@younata younata deleted the dynamic-pendable branch April 13, 2024 05:41
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.

Make Pendable resolvable after the fact.
1 participant