mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-03-13 12:40:18 -05:00
tests: fix path match on Windows
This commit is contained in:
@@ -32,7 +32,7 @@ test('polyfill detection', () => {
|
||||
// promise polyfill alone doesn't work in IE, needs this as well. fix: #1642
|
||||
expect(code).toMatch(`import "core-js/modules/es6.array.iterator"`)
|
||||
// usage-based detection
|
||||
expect(code).toMatch(/import _Map from ".*@babel\/runtime-corejs2\/core-js\/map"/)
|
||||
expect(code).toMatch(/import _Map from ".*runtime-corejs2\/core-js\/map"/)
|
||||
})
|
||||
|
||||
test('modern mode always skips polyfills', () => {
|
||||
@@ -49,7 +49,7 @@ test('modern mode always skips polyfills', () => {
|
||||
// default includes
|
||||
expect(code).not.toMatch(`import "core-js/modules/es6.promise"`)
|
||||
// usage-based detection
|
||||
expect(code).not.toMatch(/import _Map from ".*@babel\/runtime-corejs2\/core-js\/map"/)
|
||||
expect(code).not.toMatch(/import _Map from ".*runtime-corejs2\/core-js\/map"/)
|
||||
|
||||
;({ code } = babel.transformSync(`
|
||||
const a = new Map()
|
||||
@@ -63,7 +63,7 @@ test('modern mode always skips polyfills', () => {
|
||||
// default includes
|
||||
expect(code).not.toMatch(`import "core-js/modules/es6.promise"`)
|
||||
// usage-based detection
|
||||
expect(code).not.toMatch(/import _Map from ".*@babel\/runtime-corejs2\/core-js\/map"/)
|
||||
expect(code).not.toMatch(/import _Map from ".*runtime-corejs2\/core-js\/map"/)
|
||||
delete process.env.VUE_CLI_MODERN_BUILD
|
||||
})
|
||||
|
||||
@@ -92,7 +92,7 @@ test('async/await', () => {
|
||||
// should use regenerator runtime
|
||||
expect(code).toMatch(`import "regenerator-runtime/runtime"`)
|
||||
// should use required helper instead of inline
|
||||
expect(code).toMatch(/import _asyncToGenerator from ".*@babel\/runtime-corejs2\/helpers\/esm\/asyncToGenerator\"/)
|
||||
expect(code).toMatch(/import _asyncToGenerator from ".*runtime-corejs2\/helpers\/esm\/asyncToGenerator\"/)
|
||||
})
|
||||
|
||||
test('jsx', () => {
|
||||
|
||||
Reference in New Issue
Block a user