All files / botbuilder-unit/spec messageConstructorsSpec.js

100% Statements 12/12
100% Branches 0/0
100% Functions 5/5
100% Lines 12/12
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 241x 1x 1x 1x 1x 1x 1x   1x   2x     2x       1x     1x      
const botFactory = require('./lib/botFactory');
const unit = require('../');
const builder = require('botbuilder');
describe('Message Constructors Suite:', function () {
  it('Should support `bot` and `user` attributes as message constructors', function (done) {
    let bot = botFactory();
    let script = require('./scripts/messageConstructors');
 
    bot.dialog('/test', [
      function (session) {
        builder.Prompts.text(session, 'Say hello?');
      },
      function ( session,results ) {
        session.endDialog(`You typed: ${results.response}`)
      }
    ])
 
    unit( bot, script,{
      title : 'Should support `bot` and `user` attributes as message constructors'
    }).then( function () {
      done();
    });
  });
})