Cleanup lints identified by eslint

Some files were omitted in the .eslintignore, left as an exercise to the
reader.

We probably want to reduce amount of globals overall and use proper es
modules.
This commit is contained in:
Arlo Breault 2019-07-07 15:40:51 +02:00
parent ebeb45c8d6
commit fab39ae57c
22 changed files with 93 additions and 56 deletions

View file

@ -1,3 +1,5 @@
/* global expect, it, describe, spyOn, Broker */
/*
jasmine tests for Snowflake broker
*/

View file

@ -1,3 +1,5 @@
/* global expect, it, describe, Snowflake, UI */
// Fake snowflake to interact with
var snowflake = {

View file

@ -1,3 +1,5 @@
/* global expect, it, describe, spyOn */
/*
jasmine tests for Snowflake proxypair
*/

View file

@ -1,3 +1,5 @@
/* global expect, it, describe, spyOn, Snowflake, Config, UI */
/*
jasmine tests for Snowflake
*/
@ -7,34 +9,34 @@ class PeerConnection {
setRemoteDescription() {
return true;
}
send(data) {}
};
send() {}
}
class SessionDescription {};
class SessionDescription {}
SessionDescription.prototype.type = 'offer';
class WebSocket {
constructor() {
this.bufferedAmount = 0;
}
send(data) {}
};
send() {}
}
WebSocket.prototype.OPEN = 1;
WebSocket.prototype.CLOSED = 0;
var log = function() {};
var config = new Config;
var config = new Config();
var ui = new UI;
var ui = new UI();
class FakeBroker {
getClientOffer() {
return new Promise(function(F, R) {
return new Promise(function() {
return {};
});
}
};
}
describe('Snowflake', function() {

View file

@ -1,8 +1,12 @@
/* global expect, it, describe, spyOn, DebugUI, BadgeUI */
/* eslint no-redeclare: 0 */
/*
jasmine tests for Snowflake UI
*/
var document = {
getElementById: function(id) {
getElementById: function() {
return {};
},
createTextNode: function(txt) {

View file

@ -1,3 +1,5 @@
/* global expect, it, describe, Parse, Query, Params */
/*
jasmine tests for Snowflake utils
*/

View file

@ -1,3 +1,5 @@
/* global expect, it, describe, WS */
/*
jasmine tests for Snowflake websocket
*/