Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aacebo committed May 15, 2024
1 parent e6cc327 commit 80cbf0c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions js/packages/teams-ai/src/planners/AssistantsPlanner.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('AssistantsPlanner', () => {
assert(plan.commands);
assert.equal(plan.commands.length, 1);
assert.equal(plan.commands[0].type, 'SAY');
assert.equal('welcome', (plan.commands[0] as PredictedSayCommand).response);
assert.equal('welcome', (plan.commands[0] as PredictedSayCommand).response.content);
});

it('waits for current run', async () => {
Expand All @@ -113,7 +113,7 @@ describe('AssistantsPlanner', () => {
assert(plan.commands);
assert.equal(plan.commands.length, 1);
assert.equal(plan.commands[0].type, 'SAY');
assert.equal('welcome', (plan.commands[0] as PredictedSayCommand).response);
assert.equal('welcome', (plan.commands[0] as PredictedSayCommand).response.content);
});

it('waits for previous run', async () => {
Expand Down Expand Up @@ -144,7 +144,7 @@ describe('AssistantsPlanner', () => {
assert(plan.commands);
assert.equal(plan.commands.length, 1);
assert.equal(plan.commands[0].type, 'SAY');
assert.equal('welcome', (plan.commands[0] as PredictedSayCommand).response);
assert.equal('welcome', (plan.commands[0] as PredictedSayCommand).response.content);
});

it('run cancelled', async () => {
Expand Down Expand Up @@ -274,7 +274,7 @@ describe('AssistantsPlanner', () => {
assert(plan2);
assert(plan2.commands);
assert.equal(plan2.commands[0].type, 'SAY');
assert.equal((plan2.commands[0] as PredictedSayCommand).response, 'welcome');
assert.equal((plan2.commands[0] as PredictedSayCommand).response.content, 'welcome');

const toolMap: { [key: string]: string } = state.getValue('temp.submit_tool_map');
assert(toolMap);
Expand Down Expand Up @@ -332,7 +332,7 @@ describe('AssistantsPlanner', () => {
assert(plan2);
assert(plan2.commands);
assert.equal(plan2.commands[0].type, 'SAY');
assert.equal((plan2.commands[0] as PredictedSayCommand).response, 'welcome');
assert.equal((plan2.commands[0] as PredictedSayCommand).response.content, 'welcome');

const toolMap: { [key: string]: string } = state.getValue('temp.submit_tool_map');
assert(toolMap);
Expand Down Expand Up @@ -367,9 +367,9 @@ describe('AssistantsPlanner', () => {
assert(plan.commands);
assert.equal(plan.commands.length, 3);
assert.equal(plan.commands[0].type, 'SAY');
assert.equal((plan.commands[0] as PredictedSayCommand).response, 'message 2');
assert.equal((plan.commands[1] as PredictedSayCommand).response, 'message 1');
assert.equal((plan.commands[2] as PredictedSayCommand).response, 'welcome');
assert.equal((plan.commands[0] as PredictedSayCommand).response.content, 'message 2');
assert.equal((plan.commands[1] as PredictedSayCommand).response.content, 'message 1');
assert.equal((plan.commands[2] as PredictedSayCommand).response.content, 'welcome');
});
});
});
Expand Down

0 comments on commit 80cbf0c

Please sign in to comment.