@@ -14,7 +14,7 @@ test('polyfill detection', () => {
14
14
targets : { node : 'current' }
15
15
} ] ]
16
16
} )
17
- // default includes
17
+ // default i ncludes
18
18
expect ( code ) . not . toMatch ( `import "core-js/modules/es6.promise"` )
19
19
// usage-based detection
20
20
expect ( code ) . not . toMatch ( `import "core-js/modules/es6.map"` )
@@ -32,7 +32,7 @@ test('polyfill detection', () => {
32
32
// promise polyfill alone doesn't work in IE, needs this as well. fix: #1642
33
33
expect ( code ) . toMatch ( `import "core-js/modules/es6.array.iterator"` )
34
34
// usage-based detection
35
- expect ( code ) . toMatch ( ` import " core-js/modules/es6. map"` )
35
+ expect ( code ) . toMatch ( / i m p o r t _ M a p f r o m " . * @ b a b e l \/ r u n t i m e - c o r e j s 2 \/ c o r e - j s \/ m a p " / )
36
36
} )
37
37
38
38
test ( 'modern mode always skips polyfills' , ( ) => {
@@ -49,7 +49,7 @@ test('modern mode always skips polyfills', () => {
49
49
// default includes
50
50
expect ( code ) . not . toMatch ( `import "core-js/modules/es6.promise"` )
51
51
// usage-based detection
52
- expect ( code ) . not . toMatch ( ` import " core-js/modules/es6. map"` )
52
+ expect ( code ) . not . toMatch ( / i m p o r t _ M a p f r o m " . * @ b a b e l \/ r u n t i m e - c o r e j s 2 \/ c o r e - j s \/ m a p " / )
53
53
54
54
; ( { code } = babel . transformSync ( `
55
55
const a = new Map()
@@ -63,7 +63,7 @@ test('modern mode always skips polyfills', () => {
63
63
// default includes
64
64
expect ( code ) . not . toMatch ( `import "core-js/modules/es6.promise"` )
65
65
// usage-based detection
66
- expect ( code ) . not . toMatch ( ` import " core-js/modules/es6. map"` )
66
+ expect ( code ) . not . toMatch ( / i m p o r t _ M a p f r o m " . * @ b a b e l \/ r u n t i m e - c o r e j s 2 \/ c o r e - j s \/ m a p " / )
67
67
delete process . env . VUE_CLI_MODERN_BUILD
68
68
} )
69
69
@@ -92,7 +92,7 @@ test('async/await', () => {
92
92
// should use regenerator runtime
93
93
expect ( code ) . toMatch ( `import "regenerator-runtime/runtime"` )
94
94
// should use required helper instead of inline
95
- expect ( code ) . toMatch ( / @ b a b e l . * r u n t i m e \/ h e l p e r s \/ . * a s y n c T o G e n e r a t o r / )
95
+ expect ( code ) . toMatch ( / i m p o r t _ a s y n c T o G e n e r a t o r f r o m " . * @ b a b e l \/ r u n t i m e - c o r e j s 2 \/ h e l p e r s \/ e s m \/ a s y n c T o G e n e r a t o r \" / )
96
96
} )
97
97
98
98
test ( 'jsx' , ( ) => {
0 commit comments