defaultAddress is not working when passing plain strings to sendMessageToBot function
Closed this issue · 3 comments
santiagodoldan commented
const address = {
channelId: 'slack',
user: { id: 'UXXX', name: 'Santiago' },
bot: { id: 'BXXX', name: 'Suttna' },
conversation: { id: 'TXXX:CXXX' }
}
bot.dialog('/', (session: Session) => {
bot.send("Bye")
})
const message = new Message().address(address).text("Bye").toMessage()
return new BotTester(bot, { defaultAddress: address })
.sendMessageToBot("Hello", message)
.runTest()
In the above scenario, the expectation fails because it doesn't use given address
, it uses always this one https://github.com/microsoftly/BotTester/blob/master/src/config.ts#L25.
Here is a hotfix for this issue #25
santiagodoldan commented
@microsoftly lemme know if that's ok or if you need more information :)
microsoftly commented
makes sense to me
microsoftly commented
#25 fixed, closing