mirror of
https://github.com/vuejs/vue.git
synced 2024-11-21 20:28:54 +00:00
29 lines
659 B
JavaScript
29 lines
659 B
JavaScript
const featureFlags = require('../../scripts/feature-flags')
|
|
process.env.CHROME_BIN = require('puppeteer').executablePath()
|
|
|
|
const define = {
|
|
__DEV__: `true`,
|
|
'process.env.CI': String(!!process.env.CI)
|
|
}
|
|
|
|
for (const key in featureFlags) {
|
|
define[`process.env.${key}`] = String(featureFlags[key])
|
|
}
|
|
|
|
module.exports = function (config) {
|
|
config.set({
|
|
basePath: '.',
|
|
frameworks: ['jasmine'],
|
|
files: ['*.spec.ts'],
|
|
preprocessors: {
|
|
'*.spec.ts': ['esbuild']
|
|
},
|
|
esbuild: {
|
|
define
|
|
},
|
|
browsers: ['ChromeHeadless'],
|
|
plugins: ['karma-jasmine', 'karma-esbuild', 'karma-chrome-launcher'],
|
|
singleRun: true
|
|
})
|
|
}
|