forked from babel/babel
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add failing test for parallel loading of TLA modules
- Loading branch information
1 parent
56658ac
commit f93b143
Showing
6 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/babel-core/test/fixtures/async/config-mjs-tla-native/babel.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
await Promise.resolve(0); | ||
|
||
export default { | ||
plugins: ["./plugin.js"], | ||
}; |
1 change: 1 addition & 0 deletions
1
packages/babel-core/test/fixtures/async/config-mjs-tla-native/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "type": "module" } |
9 changes: 9 additions & 0 deletions
9
packages/babel-core/test/fixtures/async/config-mjs-tla-native/plugin.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export default function plugin({ types: t }) { | ||
return { | ||
visitor: { | ||
Program(path) { | ||
path.pushContainer("body", t.stringLiteral("success")); | ||
}, | ||
}, | ||
}; | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/babel-core/test/fixtures/babel-compile-async-parallel.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env node | ||
|
||
// Usage: | ||
// babel-compile-async-parallel.js [filename] | ||
import { transformAsync } from "../../lib/index.js"; | ||
|
||
(async () => { | ||
process.stdout.write(JSON.stringify(await Promise.all([ | ||
transformAsync(""), | ||
transformAsync("") | ||
]))); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters