mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-05-05 03:20:15 -05:00
test: explicitly add ie 11 to targets in tests
As the default target of browerslist now changes, the tests can no longer reflect their original intentions unless explicitly targeting IE 11.
This commit is contained in:
@@ -3,7 +3,11 @@ const babel = require('@babel/core')
|
||||
const preset = require('../index')
|
||||
const defaultOptions = {
|
||||
babelrc: false,
|
||||
presets: [preset],
|
||||
presets: [[preset, {
|
||||
targets: {
|
||||
ie: '11'
|
||||
}
|
||||
}]],
|
||||
filename: 'test-entry-file.js'
|
||||
}
|
||||
|
||||
@@ -161,7 +165,8 @@ test('disable absoluteRuntime', () => {
|
||||
`.trim(), {
|
||||
babelrc: false,
|
||||
presets: [[preset, {
|
||||
absoluteRuntime: false
|
||||
absoluteRuntime: false,
|
||||
targets: { ie: '11' }
|
||||
}]],
|
||||
filename: 'test-entry-file.js'
|
||||
})
|
||||
@@ -183,7 +188,8 @@ test('should inject polyfills / helpers using "require" statements for a umd mod
|
||||
`.trim(), {
|
||||
babelrc: false,
|
||||
presets: [[preset, {
|
||||
absoluteRuntime: false
|
||||
absoluteRuntime: false,
|
||||
targets: { ie: '11' }
|
||||
}]],
|
||||
filename: 'test-entry-file.js'
|
||||
})
|
||||
@@ -200,7 +206,8 @@ test('should inject polyfills / helpers using "import" statements for an es modu
|
||||
`.trim(), {
|
||||
babelrc: false,
|
||||
presets: [[preset, {
|
||||
absoluteRuntime: false
|
||||
absoluteRuntime: false,
|
||||
targets: { ie: '11' }
|
||||
}]],
|
||||
filename: 'test-entry-file.js'
|
||||
})
|
||||
@@ -217,7 +224,8 @@ test('should not inject excluded polyfills', () => {
|
||||
babelrc: false,
|
||||
presets: [[preset, {
|
||||
exclude: ['es.promise'],
|
||||
polyfills: ['es.array.iterator', 'es.object.assign']
|
||||
polyfills: ['es.array.iterator', 'es.object.assign'],
|
||||
targets: { ie: '11' }
|
||||
}]],
|
||||
filename: 'test-entry-file.js'
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user