From 74c1260fbd7508ca48597709ca4284511a0b3d7e Mon Sep 17 00:00:00 2001 From: Denise Scollo Date: Thu, 6 Aug 2020 14:37:30 -0300 Subject: [PATCH] remove duplicated test and fix eslint warnings (#2631) Co-authored-by: Santiago Grangetto Co-authored-by: Cecilia Avila <44245136+ceciliaavila@users.noreply.github.com> --- .../tests/dialogTestClient.test.js | 26 ++++--------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/libraries/botbuilder-testing/tests/dialogTestClient.test.js b/libraries/botbuilder-testing/tests/dialogTestClient.test.js index 240a9db486..8a9c40ffdd 100644 --- a/libraries/botbuilder-testing/tests/dialogTestClient.test.js +++ b/libraries/botbuilder-testing/tests/dialogTestClient.test.js @@ -37,31 +37,15 @@ describe('DialogTestClient', function() { assert(client.dialogTurnResult.status == DialogTurnStatus.complete, 'dialog did not end properly'); }); - it('should process a single turn waterfall dialog', async function() { - - let dialog = new WaterfallDialog('waterfall', [ - async(step) => { - await step.context.sendActivity('hello'); - return step.endDialog(); - } - ]); - - let client = new DialogTestClient('test', dialog); - let reply = await client.sendActivity('hello'); - assert(reply.text == 'hello', 'dialog responded with incorrect message'); - assert(reply.channelId == 'test', 'test channel id didnt get set'); - assert(client.dialogTurnResult.status == DialogTurnStatus.complete, 'dialog did not end properly'); - }); - it('should process a 2 turn waterfall dialog', async function() { let dialog = new WaterfallDialog('waterfall', [ - async(step) => { + async (step) => { await step.context.sendActivity('hello'); await step.context.sendActivity({type: 'typing'}); return step.next(); }, - async(step) => { + async (step) => { await step.context.sendActivity('hello 2'); return step.endDialog(); }, @@ -85,10 +69,10 @@ describe('DialogTestClient', function() { super(id); let dialog = new WaterfallDialog('waterfall', [ - async(step) => { + async (step) => { return step.prompt('textPrompt', 'Tell me something'); }, - async(step) => { + async (step) => { await step.context.sendActivity('you said: ' + step.result); return step.next(); }, @@ -118,4 +102,4 @@ describe('DialogTestClient', function() { assert(reply.text == 'you said: foo', 'dialog responded with incorrect 2nd message'); assert(client.dialogTurnResult.status == DialogTurnStatus.complete, 'dialog did not end properly'); }); -}); \ No newline at end of file +});