Files
Nicolò RibaudoandGitHub b9f762cb59 Fix compilation of parameters in async generators (#15146)
* Fix compilation of parameters in async generators

* Update packages/babel-plugin-transform-parameters/test/fixtures/regression/15145/options.json
2022-11-07 12:20:34 +01:00

11 lines
189 B
JavaScript

async function * foo (p = 1) {
yield "hello";
yield p;
}
return (async () => {
const res = [];
for await (const x of foo()) res.push(x);
expect(res).toEqual(["hello", 1]);
})();