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

Ability to save after .next #58

Open
lourd opened this issue Feb 18, 2017 · 2 comments
Open

Ability to save after .next #58

lourd opened this issue Feb 18, 2017 · 2 comments

Comments

@lourd
Copy link
Contributor

lourd commented Feb 18, 2017

Currently saving a point in the history of a mock saga is only available before a call to .next, giving the next input into the saga. It would be very helpful if you could also save after a call to .next, before the effect assertion. Attempting to do so with v2.2.0 throws a TypeError exception, e.g. ...next(...).save(...).call is not a function.

@jfairbank
Copy link
Owner

Hi, @lourd! This makes sense to make available after a call to next if possible. I'll get to it soon unless you want to take a stab at a PR for it.

@jfairbank jfairbank self-assigned this Mar 29, 2017
@jfairbank jfairbank removed their assignment May 2, 2017
@marifehe
Copy link

marifehe commented Oct 2, 2018

Hey @jfairbank , I'd like to contribute with a PR for this. I haven't done many PRs to real open source serious projects (other than mine), so I think this is a good one to start with.

I've been checking the code and I don't think the issue is that save cant be called after a call to next, but instead that save doesn't have the effects available as methods, but only the testSaga Api methods (next,back, finish, etc etc). That's why the error saying call is not a function.
So, the fix should be making the effects available after a call to save. Is that something that makes sense to you? If so, I'm very happy to put the PR. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants