-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add support for ES6 generator #2666
Comments
What if you try this approach?
|
We are not adding support for this. |
@cpojer This is sucks, because I use redux-saga.
Maybe exists some options how to resolve this problem? |
It seems like you aren't properly transforming generators in this example, this is not a Jest error. |
@cpojer Generator Function is short code and easy to read. async/await is similar to it, but it's still early. Why don't you support this? This will be one reason for using ava. |
+1 import co from 'co';
describe('generator test', () => {
it('should call generator function', co.wrap(function *() {
var data = yield someFunc()
expect(data).toBe(3);
}));
}); |
Hello @cpojer, what is your suggestion for testing generator functions ? Thanks in advance. |
Solution: It's all! |
Generators are now part of javascript. Why is this outside the scope of what is supported? |
* feat: add support for generator functions in specs Fixes #2666 * docs: update changelog with PR link
This is now implemented, but not released. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I am trying to test a generator function
someFunc*()
as follows.The test fails with this message:
The text was updated successfully, but these errors were encountered: