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

Generator support #273

Closed
searls opened this issue Jun 28, 2017 · 1 comment · Fixed by #274
Closed

Generator support #273

searls opened this issue Jun 28, 2017 · 1 comment · Fixed by #274

Comments

@searls
Copy link
Member

searls commented Jun 28, 2017

Up to this point, td.js has never had support for ES generator functions. This is a pretty large language feature, so I'm immediately intimidated of approaching it to naively. I'm not even sure yet how a generator user would want it to work.

I've been reading a little bit from activity on our sinon friends repo, and found this fork, which (I think) proposes simply wrapping a normal fake function in a generator, presumably so next() and yield * can be used, even if it just keeps returning whatever it's been stubbed to.

@searls
Copy link
Member Author

searls commented Jun 28, 2017

This was inspired by #271, since it'd fix that.

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

Successfully merging a pull request may close this issue.

1 participant