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