Skip to content

Commit

Permalink
updated test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurvir committed Mar 31, 2024
1 parent 45fe5fe commit 0ee618f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/apis/bot.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ describe('Test cases for trip planning workflow', ()=>{
expect(response.text).to.be.a('string')
})

it.only('Should try and find another hotel', async () => {
it('Should try and find another hotel', async () => {
const response = await request(app).post('/webhook').send({
From: process.env.TEST_RECEPIENT_NUMBER,
Body: "Lets confirm!"
Expand Down
6 changes: 2 additions & 4 deletions tests/unit/services/ai.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ describe('Test cases for get_schema_by_action() function', () => {
})

it('Should return false if no action found', async () => {
ai.action = null;
const response = await ai.get_schema_by_action(`I'm looking for some hotels`);
expect(response).to.be.false;
})
Expand Down Expand Up @@ -247,10 +248,7 @@ describe('Test cases for services/ai/get_beckn_request_from_text()', () => {
expect(response.data.body.context).to.have.property('bpp_uri')
expect(response.data.body.message).to.have.property('order')
expect(response.data.body.message.order).to.have.property('items')
expect(response.data.body.message.order.items[0]).to.have.property('id')
expect(response.data.body.message.order).to.have.property('billing')
expect(response.data.body.message.order.billing).to.have.property('name')
expect(response.data.body.message.order.billing).to.have.property('email')
expect(response.data.body.message.order.items[0]).to.have.property('id')
});
});

Expand Down

0 comments on commit 0ee618f

Please sign in to comment.