From 1c2881cbe6b1b57e48ae2e9b3c5dcb9bae81220e Mon Sep 17 00:00:00 2001 From: Rikki Gibson Date: Sat, 21 Jul 2018 10:29:11 -0700 Subject: [PATCH] Remove btoa polyfill tests --- test/specs/basicAuth.spec.js | 2 +- test/specs/basicAuthWithPolyfill.spec.js | 20 ------------------ test/specs/helpers/btoa.spec.js | 26 ------------------------ 3 files changed, 1 insertion(+), 47 deletions(-) delete mode 100644 test/specs/basicAuthWithPolyfill.spec.js delete mode 100644 test/specs/helpers/btoa.spec.js diff --git a/test/specs/basicAuth.spec.js b/test/specs/basicAuth.spec.js index 676dcf6..8c10117 100644 --- a/test/specs/basicAuth.spec.js +++ b/test/specs/basicAuth.spec.js @@ -1,3 +1,3 @@ -describe('basicAuth without btoa polyfill', function () { +describe('basicAuth', function () { setupBasicAuthTest(); }); diff --git a/test/specs/basicAuthWithPolyfill.spec.js b/test/specs/basicAuthWithPolyfill.spec.js deleted file mode 100644 index 980d539..0000000 --- a/test/specs/basicAuthWithPolyfill.spec.js +++ /dev/null @@ -1,20 +0,0 @@ -var window_btoa; - -describe('basicAuth with btoa polyfill', function () { - beforeAll(function() { - window_btoa = window.btoa; - window.btoa = undefined; - }); - - afterAll(function() { - window.btoa = window_btoa; - window_btoa = undefined; - }); - - it('should not have native window.btoa', function () { - expect(window.btoa).toEqual(undefined); - }); - - setupBasicAuthTest(); -}); - diff --git a/test/specs/helpers/btoa.spec.js b/test/specs/helpers/btoa.spec.js deleted file mode 100644 index b55a69a..0000000 --- a/test/specs/helpers/btoa.spec.js +++ /dev/null @@ -1,26 +0,0 @@ -var __btoa = require('../../../lib/helpers/btoa'); - -describe('btoa polyfill', function () { - it('should behave the same as native window.btoa', function () { - // btoa doesn't exist in IE8/9 - if (isOldIE && typeof Int8Array === 'undefined') { - return; - } - - var data = 'Hello, world'; - expect(__btoa(data)).toEqual(window.btoa(data)); - }); - - it('should throw an error if char is out of range 0xFF', function () { - var err; - var data = 'I ♡ Unicode!'; - - try { - __btoa(data); - } catch (e) { - err = e; - } - - validateInvalidCharacterError(err); - }); -});