Skip to content

Commit

Permalink
chore(config): remove unused browserstack configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mudetroit committed Aug 28, 2023
1 parent e56f09b commit 0adfae0
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 5,128 deletions.
41 changes: 2 additions & 39 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
/**
* Build and test rollbar.js
*
* Test with browserstack:
* $> BROWSER_STACK_USERNAME=username BROWSER_STACK_ACCESS_KEY=12345asdf grunt test --browsers=bs_ie_latest
*
*/


Expand All @@ -15,8 +11,6 @@ var pkg = require('./package.json');
var fs = require('fs');

var webpackConfig = require('./webpack.config.js');
var browserStackBrowsers = require('./browserstack.browsers');


function findTests(context) {
if (context !== 'browser') {
Expand All @@ -33,7 +27,7 @@ function findTests(context) {
return mapping;
}

function buildGruntKarmaConfig(singleRun, browsers, tests, reporters) {
function buildGruntKarmaConfig(singleRun, tests, reporters) {
var config = {
options: {
configFile: './karma.conf.js',
Expand Down Expand Up @@ -71,10 +65,6 @@ function buildGruntKarmaConfig(singleRun, browsers, tests, reporters) {
},
};

if (browsers && browsers.length) {
config.options.browsers = browsers;
}

if (reporters && reporters.length) {
config.options.reporters = reporters;
}
Expand All @@ -96,12 +86,6 @@ function buildGruntKarmaConfig(singleRun, browsers, tests, reporters) {
} else {
testConfig.files = [{src: [testFile]}];
}

// Special config for BrowserStack IE tests
if (testName.slice(0, 3) === 'bs' && testName.indexOf('ie_') >= 0) {
// Long timeout since IE 6/7/8 is slow
testConfig.captureTimeout = 60000 * 10;
}
}

return config;
Expand All @@ -112,27 +96,6 @@ module.exports = function(grunt) {
require('time-grunt')(grunt);

var browserTests = findTests('browser');
var browsers = grunt.option('browsers');
if (browsers) {
browsers = browsers.split(',');

var browserStackAliases = [];
var nonBrowserStackAliases = [];
browsers.forEach(function(browserName) {
if (browserName.slice(0, 3) === 'bs_') {
browserStackAliases.push(browserName);
} else {
nonBrowserStackAliases.push(browserName);
}
});

var expandedBrowsers = browserStackBrowsers.filter.apply(null, browserStackAliases);
var expandedBrowserNames = [];
expandedBrowsers.forEach(function(browser) {
expandedBrowserNames.push(browser._alias);
});
browsers = nonBrowserStackAliases.concat(expandedBrowserNames);
}

var singleRun = grunt.option('singleRun');
if (singleRun === undefined) {
Expand Down Expand Up @@ -165,7 +128,7 @@ module.exports = function(grunt) {
}
},

karma: buildGruntKarmaConfig(singleRun, browsers, browserTests, reporters),
karma: buildGruntKarmaConfig(singleRun, browserTests, reporters),

replace: {
snippets: {
Expand Down
153 changes: 0 additions & 153 deletions browserstack.browsers.js

This file was deleted.

Loading

0 comments on commit 0adfae0

Please sign in to comment.