Skip to content

Commit

Permalink
remove duplicated test and fix eslint warnings (#2631)
Browse files Browse the repository at this point in the history
Co-authored-by: Santiago Grangetto <[email protected]>
Co-authored-by: Cecilia Avila <[email protected]>
  • Loading branch information
3 people authored Aug 6, 2020
1 parent 9a42ce2 commit 74c1260
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions libraries/botbuilder-testing/tests/dialogTestClient.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
},
Expand All @@ -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();
},
Expand Down Expand Up @@ -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');
});
});
});

0 comments on commit 74c1260

Please sign in to comment.