From 0a29d92aed84d494782458cdd9b201db9b24ddbd Mon Sep 17 00:00:00 2001 From: Dan Seripap Date: Tue, 23 Feb 2016 16:32:02 -0500 Subject: [PATCH] Started write of tests --- .travis.yml | 2 +- src/js/darkwire.js | 5 ----- src/room.js | 10 +++++----- src/views/index.mustache | 2 +- test/app.js | 31 +++++++++++++++++++++---------- 5 files changed, 28 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index e6673cf..9fb5722 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,4 +4,4 @@ node_js: before_script: - gulp bundle - sleep 5 -script: gulp test \ No newline at end of file +script: npm test diff --git a/src/js/darkwire.js b/src/js/darkwire.js index ed43389..284c0b6 100644 --- a/src/js/darkwire.js +++ b/src/js/darkwire.js @@ -24,11 +24,6 @@ export default class Darkwire { return file.data; } - set fileQueue(fileQueue) { - this._fileQueue = fileQueue; - return this; - } - get autoEmbedImages() { return this._autoEmbedImages; } diff --git a/src/room.js b/src/room.js index ef9075e..5e11e04 100644 --- a/src/room.js +++ b/src/room.js @@ -27,7 +27,7 @@ class Room { vector: data.vector, secretKeys: data.secretKeys, signature: data.signature, - timestamp: new Date + timestamp: new Date() }); }); @@ -48,7 +48,7 @@ class Room { username: socket.username, numUsers: this.numUsers, users: this.users, - timestamp: new Date + timestamp: new Date() }); }); @@ -78,7 +78,7 @@ class Room { numUsers: this.numUsers, users: this.users, id: socket.user.id, - timestamp: new Date + timestamp: new Date() }); // remove room from rooms array @@ -111,7 +111,7 @@ class Room { newUsername: data.newUsername, publicKey: data.publicKey, users: this.users, - timestamp: new Date + timestamp: new Date() }); }); @@ -119,7 +119,7 @@ class Room { }); } - get roomId() { + roomId() { return this.id; } } diff --git a/src/views/index.mustache b/src/views/index.mustache index 1e7238a..58a643a 100644 --- a/src/views/index.mustache +++ b/src/views/index.mustache @@ -68,7 +68,7 @@