-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add additional integration test for sync/async imports
- Loading branch information
Showing
5 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
packages/core/integration-tests/test/integration/lazy-compile/index-sync-async.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,11 @@ | ||
export default () => { | ||
return Promise.all([ | ||
import('./uses-static-component').then(c => { | ||
return c.default()(); | ||
}), | ||
import('./uses-static-component-async').then(c => { | ||
return c.default(); | ||
}).then(s => { | ||
return s(); | ||
})]); | ||
} |
1 change: 1 addition & 0 deletions
1
packages/core/integration-tests/test/integration/lazy-compile/static-component.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 @@ | ||
export default () => "static component"; |
4 changes: 4 additions & 0 deletions
4
packages/core/integration-tests/test/integration/lazy-compile/uses-static-component-async.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,4 @@ | ||
export default async () => { | ||
const m = await import('./static-component'); | ||
return m.default; | ||
} |
4 changes: 4 additions & 0 deletions
4
packages/core/integration-tests/test/integration/lazy-compile/uses-static-component.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,4 @@ | ||
import staticComponent from "./static-component" | ||
export default () => { | ||
return staticComponent; | ||
} |
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