@@ -30,17 +30,21 @@ describe('validating nested defaults in isolation', () => {
3030 it . each ( [
3131 nestedDefaultCjs ,
3232 nestedDefaultExternalCjs ,
33- ] ) ( 'nested default should stay, because environment is node ' , ( mod ) => {
33+ ] ) ( 'nested default should be resolved ' , ( mod ) => {
3434 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' )
3840 } )
3941
40- it ( 'don\'t interop external module.exports, because environment is node ' , ( ) => {
42+ it ( 'externalized " module.exports" CJS module interops default ' , ( ) => {
4143 expect ( moduleDefaultCjs ) . toHaveProperty ( 'default' )
4244 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' )
4448 } )
4549} )
4650
0 commit comments