Skip to content

Commit

Permalink
fixed running of single spec file (#5648)
Browse files Browse the repository at this point in the history
Co-authored-by: monis.q <monis.q@media.net>
  • Loading branch information
monis0395 and monisq authored Aug 26, 2020
1 parent 353d2c4 commit d38b5d0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions karma.conf.maker.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,16 @@ module.exports = function(codeCoverage, browserstack, watchMode, file) {

plugins: plugins
}

// To ensure that, we are able to run single spec file
// here we are adding preprocessors, when file is passed
if (file) {
config.files.forEach((file) => {
config.preprocessors[file] = ['webpack', 'sourcemap'];
});
delete config.preprocessors['test/test_index.js'];
}

setReporters(config, codeCoverage, browserstack);
setBrowsers(config, browserstack);
return config;
Expand Down

0 comments on commit d38b5d0

Please sign in to comment.