Skip to content

Commit

Permalink
removed RTM tests for now
Browse files Browse the repository at this point in the history
  • Loading branch information
John Agan committed Jul 18, 2017
1 parent 6ef19af commit 2081e98
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions test/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,36 @@ const { TOKEN, CHANNEL } = process.env, { assert } = require('chai'),
ts = require('../index');


describe('RTM', () => {
let text = "TESTING";
let test = ts.instance({ token: TOKEN, text: text, channel: CHANNEL });

describe('rtm.start', () => {
it('should create an RTM connection', done => {
test.rtm().then(ws => ws.on('open', done));
});
});

describe('events', () => {
beforeEach(() => test.removeAllListeners());

it('should respond to the hello event', done => {
test.on('hello', msg => done());
});

it('should respond to the presence_change event', done => {
test.on('presence_change', msg => done());
});

it('should respond to the message event', done => {
test.on('*', console.log);
test.on('message', msg => done());
test.send();
});

it('should respond to any event', done => {
test.on('*', msg => done());
test.send();
});
});
});
// describe('RTM', () => {
// let text = "TESTING";
// let test = ts.instance({ token: TOKEN, text: text, channel: CHANNEL });

// describe('rtm.start', () => {
// it('should create an RTM connection', done => {
// test.rtm().then(ws => ws.on('open', done));
// });
// });

// describe('events', () => {
// beforeEach(() => test.removeAllListeners());

// it('should respond to the hello event', done => {
// test.on('hello', msg => done());
// });

// it('should respond to the presence_change event', done => {
// test.on('presence_change', msg => done());
// });

// it('should respond to the message event', done => {
// test.on('*', console.log);
// test.on('message', msg => done());
// test.send();
// });

// it('should respond to any event', done => {
// test.on('*', msg => done());
// test.send();
// });
// });
// });

0 comments on commit 2081e98

Please sign in to comment.