Skip to content

Commit

Permalink
Add a test for swc-project#1721
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed May 21, 2021
1 parent 893f44a commit 07bbc86
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions ecmascript/transforms/compat/tests/es2017_async_to_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2446,3 +2446,24 @@ test!(
})()(foo);
"
);

test!(
Syntax::default(),
|_| async_to_generator(),
issue_1721_1,
"
async function* lol() {
yield 1;
yield 2;
}
async function main() {
for await (const x of lol()) {
console.log(x);
}
}
",
"
"
);

0 comments on commit 07bbc86

Please sign in to comment.