-/* jshint expr: true */
-var assert = chai.assert;
var expect = chai.expect;
import Websock from '../core/websock.js';
import FakeWebSocket from './fake.websocket.js';
-import './assertions';
-import 'sinon';
-import sinonChai from '../node_modules/sinon-chai/lib/sinon-chai.js';
-chai.use(sinonChai);
+import sinon from '../vendor/sinon.js';
describe('Websock', function() {
"use strict";
var sock;
beforeEach(function () {
- sock = new Websock();
- WebSocket = sinon.spy();
- WebSocket.OPEN = old_WS.OPEN;
- WebSocket.CONNECTING = old_WS.CONNECTING;
- WebSocket.CLOSING = old_WS.CLOSING;
- WebSocket.CLOSED = old_WS.CLOSED;
-
- WebSocket.prototype.binaryType = 'arraybuffer';
+ sock = new Websock();
+ // eslint-disable-next-line no-global-assign
+ WebSocket = sinon.spy();
+ WebSocket.OPEN = old_WS.OPEN;
+ WebSocket.CONNECTING = old_WS.CONNECTING;
+ WebSocket.CLOSING = old_WS.CLOSING;
+ WebSocket.CLOSED = old_WS.CLOSED;
+
+ WebSocket.prototype.binaryType = 'arraybuffer';
});
describe('opening', function () {
});
after(function () {
+ // eslint-disable-next-line no-global-assign
WebSocket = old_WS;
});
});