add test and update webpack config
[new] add test config [new] add breadcrumb test [change] update package.json [new] util.js copied from element [unresolved] see test/unit/index.js @todo
This commit is contained in:
parent
c9c5e751ae
commit
9b6ff1ce28
10 changed files with 222 additions and 4 deletions
25
build/webpack.test.config.js
Normal file
25
build/webpack.test.config.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
/**
|
||||
* 用于单元测试
|
||||
*/
|
||||
|
||||
var webpack = require('webpack')
|
||||
var merge = require('webpack-merge')
|
||||
var webpackBaseConfig = require('./webpack.base.config.js');
|
||||
|
||||
|
||||
var webpackConfig = merge(webpackBaseConfig, {
|
||||
// use inline sourcemap for karma-sourcemap-loader
|
||||
devtool: '#inline-source-map',
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
NODE_ENV: '"testing"'
|
||||
}
|
||||
})
|
||||
]
|
||||
})
|
||||
|
||||
// no need for app entry during tests
|
||||
delete webpackConfig.entry
|
||||
|
||||
module.exports = webpackConfig
|
Loading…
Add table
Add a link
Reference in a new issue