@@ -30,17 +30,21 @@ describe('validating nested defaults in isolation', () => {
30
30
it . each ( [
31
31
nestedDefaultCjs ,
32
32
nestedDefaultExternalCjs ,
33
- ] ) ( 'nested default should stay, because environment is node ' , ( mod ) => {
33
+ ] ) ( 'nested default should be resolved ' , ( mod ) => {
34
34
expect ( mod ) . toHaveProperty ( 'default' )
35
- expect ( mod . default ) . toHaveProperty ( 'default' )
36
- expect ( mod . default . default . a ) . toBe ( 'a' )
37
- expect ( mod . default . default . b ) . toBe ( 'b' )
35
+ expect ( mod . default ) . not . toHaveProperty ( 'default' )
36
+ expect ( mod . default . a ) . toBe ( 'a' )
37
+ expect ( mod . default . b ) . toBe ( 'b' )
38
+ expect ( mod . a ) . toBe ( 'a' )
39
+ expect ( mod . b ) . toBe ( 'b' )
38
40
} )
39
41
40
- it ( 'don\'t interop external module.exports, because environment is node ' , ( ) => {
42
+ it ( 'externalized " module.exports" CJS module interops default ' , ( ) => {
41
43
expect ( moduleDefaultCjs ) . toHaveProperty ( 'default' )
42
44
expect ( moduleDefaultCjs . default ) . toHaveProperty ( 'a' )
43
- expect ( moduleDefaultCjs ) . not . toHaveProperty ( 'a' )
45
+ expect ( moduleDefaultCjs . default . a ) . toBe ( 'a' )
46
+ expect ( moduleDefaultCjs ) . toHaveProperty ( 'a' )
47
+ expect ( moduleDefaultCjs . a ) . toBe ( 'a' )
44
48
} )
45
49
} )
46
50
0 commit comments