Debian Codegraph @

packages/babel-plugin-proposal-async-generator-functions/test/fixtures/yield-star-polyfill-corejs3/issue-9905/exec.js

raw
1 const log = [];
2
3 async function* func1() {
4 log.push(1);
5 yield "a";
6 log.push(2);
7 }
8
9 async function* func2() {
10 yield* func1();
11 log.push(3);
12 }
13
14 return (async () => {
15 const iterator = func2();
16 await iterator.next();
17 await iterator.return();
18
19 expect(log).toEqual([1]);
20 })();