feat: add timeouts for live ts sdk provider tests

pull/723/head
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') expect(createAISDKTools(new EchoAITool())).toHaveProperty('echo')
}) })
test('createAISDKToolsFromIdentifier', async () => { test(
await expect( 'createAISDKToolsFromIdentifier',
createAISDKToolsFromIdentifier('@agentic/search') {
).resolves.toHaveProperty('search') 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) expect(createGenkitTools(genkit, new EchoAITool())).toHaveLength(1)
}) })
test('createGenkitToolsFromIdentifier', async () => { test(
const genkit = new Genkit() 'createGenkitToolsFromIdentifier',
const tools = await createGenkitToolsFromIdentifier(genkit, '@agentic/search') {
expect(tools).toHaveLength(1) timeout: 30_000
expect(tools[0]!.__action.name).toBe('search') },
}) 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) expect(createLangChainTools(new EchoAITool())).toHaveLength(1)
}) })
test('createLangChainToolsFromIdentifier', async () => { test(
const tools = await createLangChainToolsFromIdentifier('@agentic/search') 'createLangChainToolsFromIdentifier',
expect(tools).toHaveLength(1) {
expect(tools[0]!.name).toBe('search') 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) expect(createLlamaIndexTools(new EchoAITool())).toHaveLength(1)
}) })
test('createLlamaIndexToolsFromIdentifier', async () => { test(
const tools = await createLlamaIndexToolsFromIdentifier('@agentic/search') 'createLlamaIndexToolsFromIdentifier',
expect(tools).toHaveLength(1) {
expect(tools[0]!.metadata.name).toBe('search') 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') expect(createMastraTools(new EchoAITool())).toHaveProperty('echo')
}) })
test('createMastraToolsFromIdentifier', async () => { test(
const tools = await createMastraToolsFromIdentifier('@agentic/search') 'createMastraToolsFromIdentifier',
expect(tools).toHaveProperty('search') {
}) timeout: 30_000
},
async () => {
const tools = await createMastraToolsFromIdentifier('@agentic/search')
expect(tools).toHaveProperty('search')
}
)