From 945bec70ee6a103a2c50d121a062b73518bd5ea0 Mon Sep 17 00:00:00 2001 From: Jeff Posnick Date: Tue, 2 Feb 2021 10:30:33 -0500 Subject: [PATCH] blacklist => denylist --- src/browser-models/local-browser.js | 16 ++++++++-------- test/browser-usage.js | 4 ++-- test/local-browser.js | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/browser-models/local-browser.js b/src/browser-models/local-browser.js index cd0e82c..20a9fb2 100644 --- a/src/browser-models/local-browser.js +++ b/src/browser-models/local-browser.js @@ -32,12 +32,12 @@ class LocalBrowser extends Browser { * @param {DriverConfig} config The config for the browser. * @param {String} release Release name of the browser, must be 'stable', * 'beta' or 'unstable'. - * @param {Object} blacklist This is a list of browser versions => driver - * versions which is used to blacklist a browser from be made available. This + * @param {Object} denylist This is a list of browser versions => driver + * versions which is used to deny a browser from being made available. This * is not assurance of a browser working but may be used more actively * to block bad browser support in the future. */ - constructor(config, release, blacklist) { + constructor(config, release, denylist) { super(config); if (typeof config._prettyName !== 'string' || @@ -57,7 +57,7 @@ class LocalBrowser extends Browser { } this._release = release; - this._blacklist = blacklist; + this._denylist = denylist; } /** @@ -85,7 +85,7 @@ class LocalBrowser extends Browser { } } - if (this.isBlackListed()) { + if (this.isDenyListed()) { return false; } @@ -101,13 +101,13 @@ class LocalBrowser extends Browser { * This method is largely used internally to determine if a browser should * be made available or not. * - * This method will only blacklist a browser if there is a known bad browser + * This method will only denylist a browser if there is a known bad browser * + driver module combination. * - * @return {Boolean} Whether this browser is blacklisted or not from being + * @return {Boolean} Whether this browser is denylisted or not from being * included in available browsers. */ - isBlackListed() { + isDenyListed() { return false; } diff --git a/test/browser-usage.js b/test/browser-usage.js index 07d5636..a2af20d 100644 --- a/test/browser-usage.js +++ b/test/browser-usage.js @@ -101,8 +101,8 @@ describe('Test Usage of Browsers', function() { function setupTest(localBrowser) { describe(`Test Usage of ${localBrowser.getPrettyName()}`, function() { it(`should be able to use ${localBrowser.getId()} - ${localBrowser.getReleaseName()}`, function() { - if (localBrowser.isBlackListed()) { - console.warn(`Browser is blacklisted ${localBrowser.getId()} - ${localBrowser.getReleaseName()}`); + if (localBrowser.isDenyListed()) { + console.warn(`Browser is denylisted ${localBrowser.getId()} - ${localBrowser.getReleaseName()}`); return; } diff --git a/test/local-browser.js b/test/local-browser.js index 9e88860..23c1f2f 100644 --- a/test/local-browser.js +++ b/test/local-browser.js @@ -33,7 +33,7 @@ describe('LocalBrowser', function() { _prettyName: 'Example Pretty Name', }; - const EXAMPLE_BLACKLIST = { + const EXAMPLE_DENYLIST = { 999: '1.0.0', }; @@ -59,7 +59,7 @@ describe('LocalBrowser', function() { new LocalBrowser( EXAMPLE_CONFIG, 'stable', - EXAMPLE_BLACKLIST + EXAMPLE_DENYLIST ); }); @@ -71,7 +71,7 @@ describe('LocalBrowser', function() { new LocalBrowser( options, 'stable', - EXAMPLE_BLACKLIST + EXAMPLE_DENYLIST ); }).to.throw('Invalid prettyName'); }); @@ -84,7 +84,7 @@ describe('LocalBrowser', function() { new LocalBrowser( options, 'stable', - EXAMPLE_BLACKLIST + EXAMPLE_DENYLIST ); }).to.throw('Invalid prettyName'); }); @@ -296,5 +296,5 @@ describe('LocalBrowser', function() { }); }); - // TODO Blacklist test + // TODO denylist test });