mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
feat: Use spec repoter and coverage
This commit is contained in:
parent
1ff8c1475e
commit
e70281bad2
3 changed files with 21 additions and 22 deletions
|
|
@ -90,8 +90,7 @@ module.exports = function(config) {
|
|||
// endbower
|
||||
|
||||
'src/index.js',
|
||||
// 'test/spec/**/*.js',
|
||||
{pattern: 'src/**/*.test.js', watched: false},
|
||||
{ pattern: 'src/**/*.test.js', watched: false },
|
||||
],
|
||||
|
||||
// list of files / patterns to exclude
|
||||
|
|
@ -110,11 +109,9 @@ module.exports = function(config) {
|
|||
// - Safari (only Mac)
|
||||
// - PhantomJS
|
||||
// - IE (only Windows)
|
||||
browsers: [
|
||||
'PhantomJS'
|
||||
],
|
||||
browsers: [ 'PhantomJS' ],
|
||||
|
||||
reporters: ['coverage','progress'],
|
||||
reporters: ['spec', 'coverage'],
|
||||
|
||||
webpack: webpackConfig,
|
||||
webpackMiddleware: {
|
||||
|
|
@ -122,25 +119,17 @@ module.exports = function(config) {
|
|||
},
|
||||
|
||||
preprocessors: {
|
||||
'src/*/{*.js,!(test)/**/*.js}': 'coverage',
|
||||
'src/**/*.js': ['webpack', 'sourcemap',],
|
||||
'src/**/*.js': ['webpack', 'sourcemap'],
|
||||
},
|
||||
|
||||
coverageReporter: {
|
||||
type: 'html',
|
||||
dir: './reports/zeppelin-web-coverage',
|
||||
subdir: '.'
|
||||
dir: 'reports/coverage',
|
||||
reporters: [
|
||||
{ type: 'html' },
|
||||
{ type: 'text-summary' },
|
||||
]
|
||||
},
|
||||
|
||||
// Which plugins to enable
|
||||
plugins: [
|
||||
'karma-phantomjs-launcher',
|
||||
'karma-jasmine',
|
||||
'karma-coverage',
|
||||
'karma-webpack',
|
||||
'karma-sourcemap-loader',
|
||||
],
|
||||
|
||||
// Continuous Integration mode
|
||||
// if true, it capture browsers, run tests and exit
|
||||
singleRun: true,
|
||||
|
|
|
|||
|
|
@ -72,12 +72,14 @@
|
|||
"grunt-wiredep": "~2.0.0",
|
||||
"html-webpack-plugin": "^2.24.1",
|
||||
"imports-loader": "^0.7.1",
|
||||
"istanbul-instrumenter-loader": "^0.2.0",
|
||||
"jasmine-core": "^2.5.2",
|
||||
"karma": "~1.3.0",
|
||||
"karma-coverage": "^1.1.1",
|
||||
"karma-jasmine": "~1.0.2",
|
||||
"karma-sourcemap-loader": "^0.3.7",
|
||||
"karma-phantomjs-launcher": "^1.0.4",
|
||||
"karma-sourcemap-loader": "^0.3.7",
|
||||
"karma-spec-reporter": "0.0.31",
|
||||
"karma-webpack": "^1.8.1",
|
||||
"load-grunt-tasks": "^0.4.0",
|
||||
"ng-annotate-loader": "^0.2.0",
|
||||
|
|
|
|||
|
|
@ -195,7 +195,15 @@ module.exports = function makeWebpackConfig () {
|
|||
}
|
||||
}
|
||||
]})
|
||||
}]
|
||||
}],
|
||||
postLoaders: [
|
||||
{
|
||||
// COVERAGE
|
||||
test: /\.js$/,
|
||||
exclude: /(node_modules|bower_components|\.test\.js)/,
|
||||
loader: 'istanbul-instrumenter'
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue