Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Commit 0557598

Browse files
committed
use Chrome for browser tests when run on macOS Sierra; closes mochajs#2524
1 parent 4a8e3c9 commit 0557598

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

karma.conf.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ 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');
78

89
module.exports = function (config) {
910
var bundleDirpath;
@@ -47,7 +48,7 @@ module.exports = function (config) {
4748
},
4849
reporters: ['spec'],
4950
colors: true,
50-
browsers: ['PhantomJS'],
51+
browsers: [osName() === 'macOS Sierra' ? 'Chrome' : 'PhantomJS'],
5152
logLevel: config.LOG_INFO,
5253
client: {
5354
mocha: {

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,13 @@
324324
"expect.js": "^0.3.1",
325325
"karma": "^1.1.0",
326326
"karma-browserify": "^5.0.5",
327+
"karma-chrome-launcher": "^2.0.0",
327328
"karma-expect": "^1.1.2",
328329
"karma-no-mocha": "^2.0.0",
329330
"karma-phantomjs-launcher": "^0.2.3",
330331
"karma-sauce-launcher": "^1.0.0",
331332
"karma-spec-reporter": "0.0.26",
333+
"os-name": "^2.0.1",
332334
"phantomjs": "1.9.8",
333335
"rimraf": "^2.5.2",
334336
"should": "^9.0.2",

0 commit comments

Comments
 (0)