Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for chained reexports from a hybrid module (#7980)
* Add test for chained reexports from a hybrid module This captures a case where a CJS export is missing. * Add test for reexports as default from a hybrid module This captures a case where packaging fails with `Asset was skipped or not found`. * Use strict equality checks * nit: match similar test terminology Co-authored-by: Niklas Mischkulnig <4586894+mischnic@users.noreply.github.com>
- Loading branch information
Showing
9 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
.../core/integration-tests/test/integration/scope-hoisting/es6/re-export-default-hybrid/a.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,3 @@ | ||
import b from './b'; | ||
|
||
output = b.foo + b.bar; |
2 changes: 2 additions & 0 deletions
2
.../core/integration-tests/test/integration/scope-hoisting/es6/re-export-default-hybrid/b.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,2 @@ | ||
import * as c from './c'; | ||
export default c; |
2 changes: 2 additions & 0 deletions
2
.../core/integration-tests/test/integration/scope-hoisting/es6/re-export-default-hybrid/c.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,2 @@ | ||
export foo from './d'; | ||
export const bar = require('./d'); |
1 change: 1 addition & 0 deletions
1
.../core/integration-tests/test/integration/scope-hoisting/es6/re-export-default-hybrid/d.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 @@ | ||
module.exports = 1; |
3 changes: 3 additions & 0 deletions
3
packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-hybrid/a.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,3 @@ | ||
import {foo, bar} from './b'; | ||
|
||
output = foo + bar; |
1 change: 1 addition & 0 deletions
1
packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-hybrid/b.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 * from './c'; |
2 changes: 2 additions & 0 deletions
2
packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-hybrid/c.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,2 @@ | ||
export foo from './d'; | ||
export const bar = require('./d'); |
1 change: 1 addition & 0 deletions
1
packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-hybrid/d.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 @@ | ||
module.exports = 1; |
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