@@ -14,7 +14,7 @@ test('polyfill detection', () => {
1414 targets : { node : 'current' }
1515 } ] ]
1616 } )
17- // default includes
17+ // default i ncludes
1818 expect ( code ) . not . toMatch ( `import "core-js/modules/es6.promise"` )
1919 // usage-based detection
2020 expect ( code ) . not . toMatch ( `import "core-js/modules/es6.map"` )
@@ -32,7 +32,7 @@ test('polyfill detection', () => {
3232 // promise polyfill alone doesn't work in IE, needs this as well. fix: #1642
3333 expect ( code ) . toMatch ( `import "core-js/modules/es6.array.iterator"` )
3434 // 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 " . * r u n t i m e - c o r e j s 2 \/ c o r e - j s \/ m a p " / )
3636} )
3737
3838test ( 'modern mode always skips polyfills' , ( ) => {
@@ -49,7 +49,7 @@ test('modern mode always skips polyfills', () => {
4949 // default includes
5050 expect ( code ) . not . toMatch ( `import "core-js/modules/es6.promise"` )
5151 // 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 " . * r u n t i m e - c o r e j s 2 \/ c o r e - j s \/ m a p " / )
5353
5454 ; ( { code } = babel . transformSync ( `
5555 const a = new Map()
@@ -63,7 +63,7 @@ test('modern mode always skips polyfills', () => {
6363 // default includes
6464 expect ( code ) . not . toMatch ( `import "core-js/modules/es6.promise"` )
6565 // 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 " . * r u n t i m e - c o r e j s 2 \/ c o r e - j s \/ m a p " / )
6767 delete process . env . VUE_CLI_MODERN_BUILD
6868} )
6969
@@ -92,7 +92,7 @@ test('async/await', () => {
9292 // should use regenerator runtime
9393 expect ( code ) . toMatch ( `import "regenerator-runtime/runtime"` )
9494 // 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 " .* 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 \" / )
9696} )
9797
9898test ( 'jsx' , ( ) => {
0 commit comments