Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Fixed karma tests during build
Browse files Browse the repository at this point in the history
Added logging to karma browser detection
  • Loading branch information
michadvorak-cen38289 committed Feb 12, 2018
1 parent 0e5f1c8 commit 841ea9d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,22 @@ module.exports = function (config) {
detectBrowsers: {
postDetection: function (browsers) {
// When overriden, use command line
if (config.browsers) {
if (config.browsers && config.browsers.length) {
console.log('Using browsers from command-line argument', config.browsers);
return config.browsers;
}

// Run in headless mode
return browsers.map(function (b) {
browsers = browsers.map(function (b) {
if (b === 'Chrome' || b === 'Firefox') {
return b + 'Headless';
}
return b;
});

// Log and return
console.log('Using filtered detected browsers', browsers);
return browsers;
}
}
});
Expand Down

0 comments on commit 841ea9d

Please sign in to comment.