chatgpt-api/test/serpapi.test.ts

19 wiersze
361 B
TypeScript
Czysty Zwykły widok Historia

2023-06-02 07:23:13 +00:00
import test from 'ava'
2023-06-07 19:09:00 +00:00
import { SerpAPIClient } from '@/services/serpapi'
2023-06-02 07:23:13 +00:00
import './_utils'
test('SerpAPIClient.search', async (t) => {
if (!process.env.SERPAPI_API_KEY) {
return t.pass()
}
t.timeout(2 * 60 * 1000)
const client = new SerpAPIClient()
const result = await client.search('coffee')
// console.log(result)
2023-06-02 07:23:13 +00:00
t.truthy(result)
})