feat: add timeouts for live ts sdk provider tests

main
Travis Fischer 2025-07-08 18:03:04 -07:00
rodzic aa76307f8a
commit a9836ff7ce
5 zmienionych plików z 58 dodań i 25 usunięć

Wyświetl plik

@ -7,8 +7,14 @@ test('createAISDKTools', () => {
expect(createAISDKTools(new EchoAITool())).toHaveProperty('echo')
})
test('createAISDKToolsFromIdentifier', async () => {
await expect(
createAISDKToolsFromIdentifier('@agentic/search')
).resolves.toHaveProperty('search')
})
test(
'createAISDKToolsFromIdentifier',
{
timeout: 30_000
},
async () => {
await expect(
createAISDKToolsFromIdentifier('@agentic/search')
).resolves.toHaveProperty('search')
}
)

Wyświetl plik

@ -9,9 +9,18 @@ test('createGenkitTools', () => {
expect(createGenkitTools(genkit, new EchoAITool())).toHaveLength(1)
})
test('createGenkitToolsFromIdentifier', async () => {
const genkit = new Genkit()
const tools = await createGenkitToolsFromIdentifier(genkit, '@agentic/search')
expect(tools).toHaveLength(1)
expect(tools[0]!.__action.name).toBe('search')
})
test(
'createGenkitToolsFromIdentifier',
{
timeout: 30_000
},
async () => {
const genkit = new Genkit()
const tools = await createGenkitToolsFromIdentifier(
genkit,
'@agentic/search'
)
expect(tools).toHaveLength(1)
expect(tools[0]!.__action.name).toBe('search')
}
)

Wyświetl plik

@ -10,8 +10,14 @@ test('createLangChainTools', () => {
expect(createLangChainTools(new EchoAITool())).toHaveLength(1)
})
test('createLangChainToolsFromIdentifier', async () => {
const tools = await createLangChainToolsFromIdentifier('@agentic/search')
expect(tools).toHaveLength(1)
expect(tools[0]!.name).toBe('search')
})
test(
'createLangChainToolsFromIdentifier',
{
timeout: 30_000
},
async () => {
const tools = await createLangChainToolsFromIdentifier('@agentic/search')
expect(tools).toHaveLength(1)
expect(tools[0]!.name).toBe('search')
}
)

Wyświetl plik

@ -10,8 +10,14 @@ test('createLlamaIndexTools', () => {
expect(createLlamaIndexTools(new EchoAITool())).toHaveLength(1)
})
test('createLlamaIndexToolsFromIdentifier', async () => {
const tools = await createLlamaIndexToolsFromIdentifier('@agentic/search')
expect(tools).toHaveLength(1)
expect(tools[0]!.metadata.name).toBe('search')
})
test(
'createLlamaIndexToolsFromIdentifier',
{
timeout: 30_000
},
async () => {
const tools = await createLlamaIndexToolsFromIdentifier('@agentic/search')
expect(tools).toHaveLength(1)
expect(tools[0]!.metadata.name).toBe('search')
}
)

Wyświetl plik

@ -7,7 +7,13 @@ test('createMastraTools', () => {
expect(createMastraTools(new EchoAITool())).toHaveProperty('echo')
})
test('createMastraToolsFromIdentifier', async () => {
const tools = await createMastraToolsFromIdentifier('@agentic/search')
expect(tools).toHaveProperty('search')
})
test(
'createMastraToolsFromIdentifier',
{
timeout: 30_000
},
async () => {
const tools = await createMastraToolsFromIdentifier('@agentic/search')
expect(tools).toHaveProperty('search')
}
)