You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
904 B

const alias = require('../../scripts/alias')
const webpack = require('webpack')
9 years ago
const webpackConfig = {
mode: 'development',
9 years ago
resolve: {
alias: alias
9 years ago
},
module: {
rules: [
9 years ago
{
test: /\.js$/,
loader: 'babel-loader',
9 years ago
exclude: /node_modules/
}
]
},
plugins: [
new webpack.DefinePlugin({
__WEEX__: false,
9 years ago
'process.env': {
TRANSITION_DURATION: process.env.CI ? 100 : 50,
TRANSITION_BUFFER: 10
9 years ago
}
})
],
devtool: '#inline-source-map'
}
// shared config for all unit tests
module.exports = {
frameworks: ['jasmine'],
files: [
'./index.js'
9 years ago
],
preprocessors: {
'./index.js': ['webpack', 'sourcemap']
9 years ago
},
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true
},
plugins: [
'karma-jasmine',
'karma-mocha-reporter',
'karma-sourcemap-loader',
'karma-webpack'
]
9 years ago
}