Skip to content

Commit

Permalink
fixes in test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurvir committed Apr 6, 2024
1 parent 47b9809 commit a3df2a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/unit/services/ai.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,19 @@ describe('Test cases for services/ai/get_beckn_action_from_text()', () => {
});

it('Should return search action when user searches after a long context', async () => {
const response = await ai.get_beckn_action_from_text('Can you find some hotels near Casper ', hotel_session.data.actions);
const response = await ai.get_beckn_action_from_text('Can you find some hotels near Casper ', hotel_session.data.actions.formatted);
expect(response).to.have.property('action')
expect(response.action).to.equal('search');
});

it('Should return `clear_chat` action when user wishes to clear the chat', async () => {
const response = await ai.get_beckn_action_from_text('Can you clear this session ', hotel_session.data.actions);
const response = await ai.get_beckn_action_from_text('Can you clear this session ', hotel_session.data.actions.formatted);
expect(response).to.have.property('action')
expect(response.action).to.equal('clear_chat');
});

it('Should return `clear_all` action when user wishes to clear the the entire session including profile.', async () => {
const response = await ai.get_beckn_action_from_text('Can you clear this session along with my profile.', hotel_session.data.actions);
const response = await ai.get_beckn_action_from_text('Can you clear this session along with my profile.', hotel_session.data.actions.formatted);
expect(response).to.have.property('action')
expect(response.action).to.equal('clear_all');
});
Expand Down

0 comments on commit a3df2a6

Please sign in to comment.