Skip to content

Commit

Permalink
Fixed:Test Cases
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyvishal committed Apr 3, 2024
1 parent 6963fec commit 1518a84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
9 changes: 1 addition & 8 deletions config/openai.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@
{ "role": "system", "content": "A typical order flow should be search > select > init > confirm."},
{ "role": "system", "content": "Use the response of search from assistant to select items from the list of items provided by the assistant."},
{ "role": "system", "content": "Use the response of search request from assistant for filling transaction_id, bpp_id, bpp_uri in the context of all calls except `search`."},
{ "role": "system", "content": "Use the response from assistant to select items from the list of items provided by the assistant."},
{ "role": "system", "content": "For `select`, `init`, `confirm`, you must use the item `id` as part of the payload for selected item instead of name or any other key."}
],
"PRESETS" : {
"bap_id": "mit-ps-bap.becknprotocol.io",
"bap_uri": "https://mit-ps-bap.becknprotocol.io",
"version": "1.1.0",
"base_url": "https://mit-ps-bap-client.becknprotocol.io"
}
]
}
5 changes: 1 addition & 4 deletions tests/unit/services/actions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe.skip('Test cases for process_instruction function', ()=> {
})
})

describe.only('should test send_message()', () => {
describe('should test send_message()', () => {
it('should test send a message via Twilio', async () => {
const recipient = process.env.TEST_RECEPIENT_NUMBER;
const message = "hi, this is a test message";
Expand All @@ -68,20 +68,17 @@ describe.only('should test send_message()', () => {
it('should throw an error for invalid recipient', async () => {
const recipient = '';
const message = 'Test message';

try {
await actionsService.send_message(recipient, message);
throw new Error('Expected an error to be thrown');
} catch (error) {

expect(error).to.be.an.instanceOf(Error);
}
});

it('should throw an error for empty message', async () => {
const recipient = process.env.TEST_RECEPIENT_NUMBER;
const message = '';

try {
await actionsService.send_message(recipient, message);
throw new Error('Expected an error to be thrown');
Expand Down

0 comments on commit 1518a84

Please sign in to comment.