karma-sharding
Advanced tools
Comparing version 4.1.2 to 4.2.0
@@ -11,2 +11,4 @@ Please see the [Contributing to Karma] guide for information on contributing to this project. | ||
Running `npm test` will cause the plugin to load and execute in the context of the local test directory. | ||
Running `npm test` will cause the plugin to load and execute in the context of the local test directory. | ||
Ensure that you have not skipped optional dependencies when running npm install. You will need karma-coverage to be loaded for the tests to demonstrate that our overwritten reporter worked correctly. |
@@ -1,10 +0,17 @@ | ||
// ensure karma-coverage is loaded to provide the coverage preprocessor | ||
// and to register in-memory-report with istanbul | ||
module.exports = Object.assign({}, require('karma-coverage'), { | ||
// unique to sharding | ||
// karma-coverage is loaded as an optional dependency | ||
// if you install karma-sharding with --no-optional it will be skipped | ||
let coverage; | ||
try { coverage = require('karma-coverage'); } | ||
catch (er) { coverage = {}; } | ||
const sharding = { | ||
'framework:sharding': ['type', require('./framework')], | ||
'middleware:sharding': ['factory', require('./middleware')], | ||
'middleware:sharding': ['factory', require('./middleware')] | ||
}; | ||
// overrides the original - name required to trigger preprocessor | ||
'reporter:coverage': ['type', require('./reporter')] | ||
}); | ||
// if karma-coverage is loaded override reporter:coverage with our version | ||
if (coverage['reporter:coverage']) { | ||
sharding['reporter:coverage'] = ['type', require('./reporter')]; | ||
} | ||
module.exports = Object.assign({}, coverage, sharding); |
{ | ||
"name": "karma-sharding", | ||
"version": "4.1.2", | ||
"version": "4.2.0", | ||
"description": "Karma plugin to allow tests to be distributed across multiple browsers", | ||
@@ -48,4 +48,6 @@ "engines": { | ||
"homepage": "https://github.com/rschuft/karma-sharding#readme", | ||
"optionalDependencies": { | ||
"karma-coverage": "^1.1.1" | ||
}, | ||
"dependencies": { | ||
"karma-coverage": "^1.1.1", | ||
"lodash": "^4.17.4" | ||
@@ -52,0 +54,0 @@ }, |
34217
633
3
- Removedkarma-coverage@^1.1.1