mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-25 22:16:49 +08:00
* feat: merge types and add tests - Merged types.ts and tracker.ts - Added Jest configuration and setup - Added comprehensive tests for tools and agent - Updated package.json with test scripts Co-Authored-By: Han Xiao <han.xiao@jina.ai> * chore: remove tracker.ts after merging into types.ts Co-Authored-By: Han Xiao <han.xiao@jina.ai> * fix: remove sensitive API keys from jest.setup.js Co-Authored-By: Han Xiao <han.xiao@jina.ai> * fix: improve error handling and test timeouts Co-Authored-By: Han Xiao <han.xiao@jina.ai> * feat: add token budget enforcement to TokenTracker Co-Authored-By: Han Xiao <han.xiao@jina.ai> * feat: add github actions workflow for CI and fix remaining issues Co-Authored-By: Han Xiao <han.xiao@jina.ai> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Han Xiao <han.xiao@jina.ai>
13 lines
494 B
TypeScript
13 lines
494 B
TypeScript
import { braveSearch } from '../brave-search';
|
|
|
|
describe('braveSearch', () => {
|
|
it('should return search results', async () => {
|
|
const { response } = await braveSearch('test query');
|
|
expect(response.web.results).toBeDefined();
|
|
expect(response.web.results.length).toBeGreaterThan(0);
|
|
expect(response.web.results[0]).toHaveProperty('title');
|
|
expect(response.web.results[0]).toHaveProperty('url');
|
|
expect(response.web.results[0]).toHaveProperty('description');
|
|
});
|
|
});
|