You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constunit=require("botbuilder-unit");constbotbuilder=require("botbuilder");constscript=[];classTestDialogextendsbotbuilder.SimpleDialog{constructor(){super(()=>{});}}constdialog=newTestDialog();unit(dialog,script,{title: 'Your first test script',reporter: newunit.BeautyLogReporter()}).then(()=>{console.log('Script passed');},(err)=>{console.error(err);});
Results in :
Error: Unknown type of bot/dialog. Error: {"actions":{}}
Looking at botbuilder-unit.js resolveBot function:
functionresolveBot(bot){letisWaterfall=("function"==typeofbot)||Array.isArray(bot);if(isWaterfall){letdialog=bot;letconnector=newTestConnector();bot=newbuilder.UniversalBot(connector);bot.dialog('/',dialog);}elseif(botinstanceofbuilder.UniversalBot){if(!bot.connector()){bot.connector('console',newTestConnector());}}else{thrownewError(`Unknown type of bot/dialog. Error: ${JSON.stringify(bot)}`);}returnbot;}
Could maybe check for instanceof builder.Dialog, eg:
Example
Results in :
Looking at botbuilder-unit.js
resolveBot
function:Could maybe check for
instanceof builder.Dialog
, eg:Would you consider a pull request?
The text was updated successfully, but these errors were encountered: