added unit testing, and started implementing unit tests...phew

This commit is contained in:
Josh Burman
2019-03-12 22:28:02 -04:00
parent 74aad4a957
commit e8c2539f1b
3489 changed files with 464813 additions and 88 deletions

View File

@ -1,5 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var logger = require('../logger');
class ClientBase {
constructor(data, ws) {
this.ws = ws;
@ -16,8 +17,9 @@ class ClientBase {
connectToChannel(channel) {
this.channel = channel;
this.ws.on('message', (message) => {
logger.accessLog.info(`starting broadcast on channel ${channel.id}: `, { message: message });
channel.broadcastMessage(this, message);
console.log('broadcasted: %s', message);
logger.accessLog.info(`broadcast complete on channel ${channel.id}: `, { message: message });
});
}
replaceWebSocket(ws) {