Skip to content

Commit

Permalink
Downgrade karma until codymikol/karma-webpack#62 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
nkbt committed Jul 20, 2015
1 parent 143535a commit 837c9c6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 42 deletions.
68 changes: 27 additions & 41 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,17 @@
var path = require('path');


var webpackConfig = {
devtool: 'eval',
resolve: {
extensions: ['', '.js']
},
module: {
loaders: process.env.COVERAGE ?
[
{test: /\.js$/, loader: 'babel', include: [path.resolve('./test')]},
{test: /\.js$/, loader: 'isparta', include: [path.resolve('./src')]}
] :
[
{
test: /\.js$/, loader: 'babel', include: [path.resolve('./src'), path.resolve('./test')]
}
]
},
stats: {
colors: true
}
};
var preLoaders = process.env.COVERAGE ?
[
{test: /\.js$/, loader: 'babel', include: [path.resolve('test')]},
{test: /\.js$/, loader: 'isparta', include: [path.resolve('src')]}
] :
[
{test: /\.js$/, loader: 'babel', include: [path.resolve('src'), path.resolve('test')]}
];


var coverageDir = path.resolve(path.join(process.env.CIRCLE_ARTIFACTS || './reports', 'coverage'));


module.exports = function (config) {
Expand All @@ -36,40 +26,36 @@ module.exports = function (config) {
'test/utils/mockedWindow.js',
'test/index.js'
],
webpack: webpackConfig,
webpack: {
devtool: 'eval',
resolve: {
extensions: ['', '.js']
},
module: {preLoaders: preLoaders},
stats: {colors: true}
},
webpackMiddleware: {
stats: {
chunkModules: false,
colors: true
}
quiet: true
},
exclude: [],
preprocessors: {
'test/index.js': ['webpack']
},
reporters: ['progress'],
coverageReporter: process.env.CIRCLE_ARTIFACTS ? {
dir: process.env.CIRCLE_ARTIFACTS + '/coverage/',
subdir: '.',
reporters: [
{type: 'html'},
{type: 'lcovonly'},
{type: 'text'}
]
} : {
dir: './coverage/',
junitReporter: {
outputDir: path.resolve(process.env.CIRCLE_TEST_REPORTS || './reports'),
suite: ''
},
coverageReporter: {
dir: coverageDir,
subdir: '.',
reporters: [
{type: 'html'},
{type: 'lcovonly'},
{type: 'text', file: 'text.txt'},
{type: 'text'},
{type: 'text-summary', file: 'text-summary.txt'}
]
},
junitReporter: {
outputFile: process.env.CIRCLE_TEST_REPORTS + '/karma.xml',
suite: ''
},
captureTimeout: 90000,
browserNoActivityTimeout: 60000,
port: 9876,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"inject-loader": "^2.0.0",
"isparta-loader": "^0.2.0",
"jasmine-core": "^2.3.4",
"karma": "^0.13.2",
"karma": "^0.12.37",
"karma-chrome-launcher": "^0.2.0",
"karma-coverage": "^0.4.2",
"karma-jasmine": "^0.3.6",
Expand Down

0 comments on commit 837c9c6

Please sign in to comment.