From a3df2a63f18644aa91359a0ea666cc31e07158b1 Mon Sep 17 00:00:00 2001 From: Mayur Virendra Date: Sat, 6 Apr 2024 17:07:15 +0530 Subject: [PATCH] fixes in test cases --- tests/unit/services/ai.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/services/ai.test.js b/tests/unit/services/ai.test.js index 2418a82..5aedebe 100644 --- a/tests/unit/services/ai.test.js +++ b/tests/unit/services/ai.test.js @@ -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'); });