Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* Created by lmarkus on 9/30/15.
*/
/*eslint max-nested-callbacks:[0]*/
'use strict';
require('coffee-script/register');
var hubot = require('hubot'),
Robot = hubot.Robot,
Message = hubot.TextMessage,
utils = require('../utils'),
assert = require('chai').assert,
Conversation = require('../../'),
c = require('../../lib/constants'),
Dialog = require('../../lib/Dialog'),
testUser = new hubot.User('Lenny', {room: 'The Lounge'})
;
describe('#Hubot Conversation', function () {
var bot, switchBoard, messenger, messages;
beforeEach(function () {
//reset the bot;
bot = new Robot('hubot/src/adapters', 'shell');
switchBoard = new Conversation(bot);
messages = [
new Message(testUser, 'hubot clean the house', '123'),
new Message(testUser, 'the kitchen', '456'),
new Message(testUser, 'yes', '789')
];
messenger = new utils.Messenger(bot, messages);
});
_notifyHubot(from, content, groupUser, MsgId) {
let user = new User(from, {groupUser});
if (this.ignoreGroupMessage && this._isGroup(from)) {
return this.robot.logger.debug(`Ignore group message ${content}`);
}
this.robot.receive(new TextMessage(user, content, MsgId));
}