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.
65 lines
1.1 KiB
65 lines
1.1 KiB
var path = require('path'); |
|
|
|
module.exports = function(config) { |
|
config.set({ |
|
basePath: '..', |
|
frameworks: ['mocha', 'chai-sinon'], |
|
reporters: ['mocha'], |
|
|
|
browsers: [process.env.KARMA_BROWSERS || 'PhantomJS'], |
|
|
|
files: [ |
|
'tests/**/*.js' |
|
], |
|
|
|
preprocessors: { |
|
'tests/**/*.js': ['webpack'], |
|
'src/**/*.js': ['webpack'], |
|
'**/*.js': ['sourcemap'] |
|
}, |
|
|
|
client: { |
|
mocha: { |
|
timeout: 6000 |
|
} |
|
}, |
|
|
|
webpack: { |
|
module: { |
|
loaders: [ |
|
{ |
|
test: /\.jsx?$/, |
|
exclude: /node_modules/, |
|
loader: 'babel', |
|
query: { |
|
sourceMap: 'inline', |
|
presets: ['es2015-loose', 'stage-0', 'react'], |
|
plugins: [ |
|
'transform-class-properties', |
|
'transform-object-rest-spread', |
|
['transform-react-jsx', { pragma:'h' }] |
|
] |
|
} |
|
}, |
|
{ |
|
test: /\.css$/, |
|
loader: 'style!css' |
|
} |
|
] |
|
}, |
|
resolve: { |
|
modulesDirectories: [ |
|
path.resolve(__dirname, '..'), |
|
'node_modules' |
|
], |
|
alias: { |
|
src: path.resolve(__dirname, '..', 'src') |
|
} |
|
} |
|
}, |
|
|
|
webpackMiddleware: { |
|
noInfo: true |
|
} |
|
}); |
|
};
|
|
|