Skip to content

Commit

Permalink
Add test for compatibility with babel-env's for await of rewriting
Browse files Browse the repository at this point in the history
  • Loading branch information
rpetrich committed Apr 27, 2019
1 parent 68b7e40 commit e087183
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions tests/babel for await of rewriting compatibility/input.js
@@ -0,0 +1,10 @@
export default async function foo() {
const out = [];
for await (const item of [1, 2]) {
out.push(item);
}

return out;
}

foo().then(console.log);
14 changes: 14 additions & 0 deletions tests/babel for await of rewriting compatibility/options.json
@@ -0,0 +1,14 @@
{
"checkSyntax": false,
"module": true,
"supportedBabels": ["babel 7"],
"presets": [[
"@babel/preset-env",
{
"loose": true,
"modules": false,
"targets": {"node": 8},
"exclude": ["@babel/plugin-transform-async-to-generator"]
}
]]
}
1 change: 1 addition & 0 deletions tests/babel for await of rewriting compatibility/output.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e087183

Please sign in to comment.