Skip to content

Commit 93392dd

Browse files
committed
no special case for macOS running Karma locally
- also, reformat a conditional ariya/phantomjs#14558 was causing seg faults at the time this change was made; it is no longer causing seg faults, so phantomjs should be the default. this was prompted by #2759
1 parent 4d1d91d commit 93392dd

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

karma.conf.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ var fs = require('fs');
44
var path = require('path');
55
var mkdirp = require('mkdirp');
66
var baseBundleDirpath = path.join(__dirname, '.karma');
7-
var osName = require('os-name');
87

98
module.exports = function (config) {
109
var bundleDirpath;
@@ -48,7 +47,7 @@ module.exports = function (config) {
4847
},
4948
reporters: ['spec'],
5049
colors: true,
51-
browsers: [osName() === 'macOS Sierra' ? 'Chrome' : 'PhantomJS'], // This is the default browser to run, locally
50+
browsers: ['PhantomJS'], // This is the default browser to run, locally
5251
logLevel: config.LOG_INFO,
5352
client: {
5453
mocha: {
@@ -97,13 +96,14 @@ module.exports = function (config) {
9796
console.error('Local/unknown environment detected');
9897
bundleDirpath = path.join(baseBundleDirpath, 'local');
9998
// don't need to run sauce from appveyor b/c travis does it.
100-
if (!(env.SAUCE_USERNAME || env.SAUCE_ACCESS_KEY)) {
101-
console.error('No SauceLabs credentials present');
102-
} else {
99+
if (env.SAUCE_USERNAME || env.SAUCE_ACCESS_KEY) {
103100
sauceConfig = {
104-
build: require('os').hostname() + ' (' + Date.now() + ')'
101+
build: require('os')
102+
.hostname() + ' (' + Date.now() + ')'
105103
};
106104
console.error('Configured SauceLabs');
105+
} else {
106+
console.error('No SauceLabs credentials present');
107107
}
108108
}
109109
mkdirp.sync(bundleDirpath);

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,6 @@
334334
"karma-sauce-launcher": "coderbyheart/karma-sauce-launcher",
335335
"karma-spec-reporter": "0.0.26",
336336
"nyc": "^10.0.0",
337-
"os-name": "^2.0.1",
338337
"phantomjs": "1.9.8",
339338
"rimraf": "^2.5.2",
340339
"semistandard": "^9.2.1",

0 commit comments

Comments
 (0)