File tree Expand file tree Collapse file tree 4 files changed +19
-0
lines changed
test/cases/parsing/harmony-deep-exports Expand file tree Collapse file tree 4 files changed +19
-0
lines changed Original file line number Diff line number Diff line change
1
+ module . exports = require ( "./cjs3" ) ;
Original file line number Diff line number Diff line change
1
+ exports . a = 1 ;
2
+ exports . b = 2 ;
3
+ exports . cjs3DefaultProvidedInfo = __webpack_exports_info__ . default . provideInfo ;
Original file line number Diff line number Diff line change
1
+ export default 2 ;
2
+ export const esmDefaultProvidedInfo = __webpack_exports_info__ . default . provideInfo ;
Original file line number Diff line number Diff line change 1
1
import * as C from "./reexport-namespace" ;
2
2
import { counter } from "./reexport-namespace" ;
3
3
import * as C2 from "./reexport-namespace-again" ;
4
+ import cj2 , { cjs3DefaultProvidedInfo } from "./cjs2" ;
5
+ import esm1 , { esmDefaultProvidedInfo } from "./esm1" ;
6
+
7
+ it ( "default providedInfo should be correct for cjs" , ( ) => {
8
+ expect ( cj2 . a ) . toBe ( 1 ) ;
9
+ expect ( cjs3DefaultProvidedInfo ) . toBe ( false ) ;
10
+ expect ( __webpack_exports_info__ . cj2 . default . provideInfo ) . toBe ( false ) ;
11
+ } ) ;
12
+
13
+ it ( "default providedInfo and usedInfo should be correct for esm" , ( ) => {
14
+ expect ( esm1 ) . toBe ( 2 ) ;
15
+ expect ( esmDefaultProvidedInfo ) . toBe ( true ) ;
16
+ } ) ;
4
17
5
18
it ( "should allow to reexport namespaces 1" , ( ) => {
6
19
( 0 , counter . reset ) ( ) ;
You can’t perform that action at this time.
0 commit comments