Skip to content

Commit

Permalink
test(tools): add test for createToolObject with single parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
JeelRajodiya committed Jan 16, 2025
1 parent 522f2c1 commit 8939a79
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/tools/tools-object.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,26 @@ describe('Tools Object', () => {

expect(result).toEqual(expected);
});
it('should create a tool object one parameters', async () => {
// We will pass only the first parameter in the createToolObject
const toolFile = createToolFileContent({
title: 'Test Tool',
description: 'Test Description',
hasCommercial: true,
additionalLinks: { docsUrl: 'https://docs.example.com' }
});

const expected = createExpectedToolObject({
title: 'Test Tool',
description: 'Test Description',
hasCommercial: true,
additionalLinks: { docsUrl: 'https://docs.example.com' }
});
expected.filters.isAsyncAPIOwner = ""
const result = await createToolObject(toolFile);
expect(result).toEqual(expected);

});

it('should convert tools data correctly', async () => {
const toolContent = createToolFileContent({ title: 'Valid Tool', categories: ['Category1'] });
Expand Down

0 comments on commit 8939a79

Please sign in to comment.