"use strict";var cov_h9a3mwwe1=function(){var path="/Users/josh.burman/Projects/braid/dist/server/test/channelBase.spec.js";var hash="68e52daa9db4e6b4d68f38008a1b8576c8b6849d";var Function=function(){}.constructor;var global=new Function("return this")();var gcv="__coverage__";var coverageData={path:"/Users/josh.burman/Projects/braid/dist/server/test/channelBase.spec.js",statementMap:{"0":{start:{line:2,column:0},end:{line:2,column:62}},"1":{start:{line:3,column:11},end:{line:3,column:40}},"2":{start:{line:4,column:13},end:{line:4,column:35}},"3":{start:{line:5,column:12},end:{line:5,column:28}},"4":{start:{line:6,column:16},end:{line:6,column:29}},"5":{start:{line:7,column:10},end:{line:7,column:34}},"6":{start:{line:8,column:13},end:{line:8,column:33}},"7":{start:{line:9,column:11},end:{line:9,column:25}},"8":{start:{line:11,column:10},end:{line:11,column:367}},"9":{start:{line:12,column:15},end:{line:12,column:33}},"10":{start:{line:16,column:0},end:{line:51,column:3}}},fnMap:{"0":{name:"(anonymous_0)",decl:{start:{line:16,column:24},end:{line:16,column:25}},loc:{start:{line:16,column:36},end:{line:51,column:1}},line:16}},branchMap:{},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0},f:{"0":0},b:{},_coverageSchema:"43e27e138ebf9cfc5966b082cf9a028302ed4184"};var coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();cov_h9a3mwwe1.s[0]++;Object.defineProperty(exports,"__esModule",{value:true});var exec=(cov_h9a3mwwe1.s[1]++,require('child_process').exec);var expect=(cov_h9a3mwwe1.s[2]++,require('chai').expect);var sinon=(cov_h9a3mwwe1.s[3]++,require('sinon'));var WebSocket=(cov_h9a3mwwe1.s[4]++,require('ws'));var app=(cov_h9a3mwwe1.s[5]++,require('../config/app'));var server=(cov_h9a3mwwe1.s[6]++,require('../server'));var name=(cov_h9a3mwwe1.s[7]++,'test channel');// var url: string = `wss://ysbraid.localhost:8443?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImNsaWVudCI6InRlc3QiLCJjbGllbnRfdHlwZSI6InNpdGUiLCJ1c2VyX3R5cGUiOiJ1c2VyIiwidXNlcl9pZCI6MjAwLCJjaGFubmVsIjoidGVzdF9jaGFubmVsIn0sImF1ZCI6ImludGVybmFsIiwiaXNzIjoiWWFyZHN0aWNrIFNvZnR3YXJlIiwic3ViIjoiQnJhaWQgSldUIn0.5KNCov_EW1cycT4Ay0oSvk4Z4PHFedd3bWOyqkHHTBQ`;
var url=(cov_h9a3mwwe1.s[8]++,"wss://ysbraid.localhost:8443?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImNsaWVudCI6Im1ocyIsImNsaWVudF90eXBlIjoic2l0ZSIsInVzZXJfdHlwZSI6InVzZXIiLCJ1c2VyX2lkIjoxMjUsImNoYW5uZWwiOiJtaHNfMTIzOSJ9LCJleHAiOjE1NTI4NDYzOTQsImF1ZCI6ImludGVybmFsIiwiaXNzIjoiWWFyZHN0aWNrIFNvZnR3YXJlIiwic3ViIjoiQnJhaWQgSldUIn0.5a_s8rgln4rwhVqJLcSS9Uw7yw1_PmYgslWKZllgK6g");var wsClient=(cov_h9a3mwwe1.s[9]++,new WebSocket(url));var channel;// var data: any = { 'client': 'test', 'client_type':'site', 'user_id': 125, 'user_type': 'user', 'channel': 'test channel' }
// var client: ClientBase = new ClientBase(data, wsClient);
cov_h9a3mwwe1.s[10]++;describe('ChannelBase',function(){// before ( function () { server.startServer; });
// it('should create a class of ChannelBase', function () {
//   channel = server.channelManager.channelExists(name);
//   expect(channel.id).to.be.equal(name);
// });
// it('should add a client to channel', function () {
//   var result: any = channel.addClient(client);
//   expect(result.status).to.be.equal('success');
// });
// it('should find a client when trying to add said client to channel', function () {
//   var result: any = channel.addClient(client);
//   expect(result.status).to.be.equal('notice');
// });
// it('should find a client', function () {
//   var exist = channel.clientExists(client.id);
//   var result = exist ? true : false;
//   expect(result).to.be.equal(true);
// });
// it('should broadcast a message to others', function () {
//   // var wstClient = new WebSocketClient();
//   // var teacher_data: any = { 'client': 'test', 'client_type':'site', 'user_id': 126, 'user_type': 'teacher', 'channel': name }
//   // var teacher: ClientBase = new ClientBase(teacher_data, wstClient);
//   // channel.addClient(client);
//   // channel.addClient(teacher);
//   // var result = channel.broadcastMessage(client, 'test message');
//   // expect(result.status).to.be.equal('success');
// });
// it('should not broadcast a message to self', function () {
//   // var broadcastMessage = sinon.stub(channel, 'broadcastMessage').callsFake(function (client: ClientBase|null, message: string) {
//   //   return message;
//   // })
//   var result = channel.broadcastMessage(client, 'test message');
//   expect(result.status).to.be.equal('success');
// });
cov_h9a3mwwe1.f[0]++;});//# sourceMappingURL=channelBase.spec.js.map