bb5a3b52 by Adam Heath

Do the src/scripts fixup without regard to the value of withCoverage.

1 parent b7140c57
......@@ -407,6 +407,20 @@ module.exports = function (grunt) {
baseUrl: mpConfig.base + '/scripts',
},
};
template = _.extend({}, template, {
process: (function(origProcess) {
return function process(grunt, task, context) {
var src = [];
context.scripts.src.forEach(function(file) {
if (!grunt.file.isMatch(specs, file)) {
src.push(file);
}
});
context.scripts.src = src;
return origProcess.apply(this, arguments);
};
})(template.process),
});
if (mpConfig.jasmine.withCoverage) {
var instrumentationCallback = function instrumentationCallback(mpConfigBase) {
/* global requirejs:false */
......@@ -448,20 +462,7 @@ module.exports = function (grunt) {
coverage: 'dist/coverage/coverage.json',
report: 'dist/coverage',
replace: false,
template: _.extend({}, template, {
process: (function(origProcess) {
return function process(grunt, task, context) {
var src = [];
context.scripts.src.forEach(function(file) {
if (!grunt.file.isMatch(specs, file)) {
src.push(file);
}
});
context.scripts.src = src;
return origProcess.apply(this, arguments);
};
})(template.process),
}),
template: template,
templateOptions: templateOptions,
files: _.concat([], src, specs),
};
......