"use strict";var cov_h9a3mwwe1=function(){var path="/Users/josh.burman/Projects/braid/dist/server/test/channelBase.spec.js";var hash="63ffcce8be98f330812dd9c1afd8ea3d74aa9946";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:21},end:{line:3,column:53}},"2":{start:{line:5,column:11},end:{line:5,column:40}},"3":{start:{line:6,column:13},end:{line:6,column:35}},"4":{start:{line:7,column:12},end:{line:7,column:28}},"5":{start:{line:8,column:16},end:{line:8,column:29}},"6":{start:{line:9,column:10},end:{line:9,column:34}},"7":{start:{line:11,column:11},end:{line:11,column:25}},"8":{start:{line:12,column:10},end:{line:12,column:67}},"9":{start:{line:13,column:15},end:{line:13,column:33}},"10":{start:{line:15,column:11},end:{line:15,column:118}},"11":{start:{line:16,column:13},end:{line:16,column:53}},"12":{start:{line:17,column:0},end:{line:52,column:3}}},fnMap:{"0":{name:"(anonymous_0)",decl:{start:{line:17,column:24},end:{line:17,column:25}},loc:{start:{line:17,column:36},end:{line:52,column:1}},line:17}},branchMap:{},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":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});const clientBase_1=(cov_h9a3mwwe1.s[1]++,require("../clients/clientBase"));// import ChannelManager from '../channelManager';
var exec=(cov_h9a3mwwe1.s[2]++,require('child_process').exec);var expect=(cov_h9a3mwwe1.s[3]++,require('chai').expect);var sinon=(cov_h9a3mwwe1.s[4]++,require('sinon'));var WebSocket=(cov_h9a3mwwe1.s[5]++,require('ws'));var app=(cov_h9a3mwwe1.s[6]++,require('../config/app'));// var server = require('../server');
var name=(cov_h9a3mwwe1.s[7]++,'test channel');var url=(cov_h9a3mwwe1.s[8]++,`wss://${app.hostname}:${app.port}?token=${app.devToken}`);var wsClient=(cov_h9a3mwwe1.s[9]++,new WebSocket(url));var channel;var data=(cov_h9a3mwwe1.s[10]++,{'client':'test','client_type':'site','user_id':125,'user_type':'user','channel':'test channel'});var client=(cov_h9a3mwwe1.s[11]++,new clientBase_1.default(data,wsClient));cov_h9a3mwwe1.s[12]++;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