mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2026-03-22 07:29:35 +08:00
feat: use s.jina.ai for search
This commit is contained in:
@@ -4,7 +4,7 @@ import { TokenTracker } from '../../utils/token-tracker';
|
|||||||
describe('search', () => {
|
describe('search', () => {
|
||||||
it.skip('should perform search with Jina API (skipped due to insufficient balance)', async () => {
|
it.skip('should perform search with Jina API (skipped due to insufficient balance)', async () => {
|
||||||
const tokenTracker = new TokenTracker();
|
const tokenTracker = new TokenTracker();
|
||||||
const { response } = await jinaSearch('TypeScript programming', process.env.JINA_API_KEY!, tokenTracker);
|
const { response } = await jinaSearch('TypeScript programming', tokenTracker);
|
||||||
expect(response).toBeDefined();
|
expect(response).toBeDefined();
|
||||||
expect(response.data).toBeDefined();
|
expect(response.data).toBeDefined();
|
||||||
if (response.data === null) {
|
if (response.data === null) {
|
||||||
@@ -15,7 +15,7 @@ describe('search', () => {
|
|||||||
}, 15000);
|
}, 15000);
|
||||||
|
|
||||||
it('should handle empty query', async () => {
|
it('should handle empty query', async () => {
|
||||||
await expect(jinaSearch('', process.env.JINA_API_KEY!)).rejects.toThrow();
|
await expect(jinaSearch('')).rejects.toThrow();
|
||||||
}, 15000);
|
}, 15000);
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user