Removed slow test for long-removed IE specific code
This commit is contained in:
@@ -1,34 +1,5 @@
|
|||||||
describe('base helpers', function() {
|
describe('base helpers', function() {
|
||||||
describe('isError', function() {
|
describe('isError', function() {
|
||||||
it('correctly handles WebSocket events', function(done) {
|
|
||||||
if (typeof jasmine.getGlobal().WebSocket === 'undefined') {
|
|
||||||
pending('Environment does not provide WebSocket');
|
|
||||||
}
|
|
||||||
|
|
||||||
const obj = (function() {
|
|
||||||
const sock = new WebSocket('ws://localhost');
|
|
||||||
let event;
|
|
||||||
sock.onerror = function(e) {
|
|
||||||
event = e;
|
|
||||||
};
|
|
||||||
return function() {
|
|
||||||
return event;
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
let left = 20;
|
|
||||||
|
|
||||||
const int = setInterval(function() {
|
|
||||||
if (obj() || left === 0) {
|
|
||||||
const result = privateUnderTest.isError(obj());
|
|
||||||
expect(result).toBe(false);
|
|
||||||
clearInterval(int);
|
|
||||||
done();
|
|
||||||
} else {
|
|
||||||
left--;
|
|
||||||
}
|
|
||||||
}, 100);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('returns true for an Error subclass', function() {
|
it('returns true for an Error subclass', function() {
|
||||||
function MyError() {}
|
function MyError() {}
|
||||||
MyError.prototype = new Error();
|
MyError.prototype = new Error();
|
||||||
|
|||||||
Reference in New Issue
Block a user