-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
Description
🐛 Bug Report
Async Iterators or generators simply don't work with jest even thought they're natively supported in Node 10
To Reproduce
- Install Node 10.x.x
cd
to a test project wherejest
works- add
async function* foo() {}
to some file - run your project (with
yarn start
ornode index.js
etc.) - Notice that it works
- Try running your test cases
yarn test
- Notice that jest complains about "unexpected token
*
"
Expected behavior
The test suite should run normally and not throw this error
Link to repl or repo (highly encouraged)
Seems like repl.it doesn't have node 10. Sorry :/
Issues without a reproduction link are likely to stall.
Run npx envinfo --preset jest
Paste the results here:
npx: installed 1 in 1.672s
System:
OS: macOS High Sierra 10.13.5
CPU: x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Binaries:
Node: 10.3.0 - ~/.nvm/versions/node/v10.3.0/bin/node
Yarn: 1.7.0 - ~/.yarn/bin/yarn
npm: 6.1.0 - ~/.nvm/versions/node/v10.3.0/bin/npm
nooga, AlexExarhos, sithmel, anru, shaunc and 1 more
Metadata
Metadata
Assignees
Labels
No labels