提交 1c2881cb 编写于 作者: R Rikki Gibson 提交者: Khaled Garbaya

Remove btoa polyfill tests

上级 e9c481fa
describe('basicAuth without btoa polyfill', function () {
describe('basicAuth', function () {
setupBasicAuthTest();
});
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();
});
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);
});
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册