Nick: fixed
This commit is contained in:
parent
eb88447e8b
commit
5be208f595
@ -584,7 +584,7 @@ describe("E2E Tests for API Routes", () => {
|
||||
.post('/v0/crawl')
|
||||
.set('Authorization', `Bearer ${process.env.TEST_API_KEY}`)
|
||||
.set('Content-Type', 'application/json')
|
||||
.send({ url: 'https://arxiv.org/abs/astro-ph/9301001', crawlerOptions: { limit: 10, excludes: [ 'list/*', 'login', 'abs/*', 'static/*', 'about/*', 'archive/*' ] }});
|
||||
.send({ url: 'https://arxiv.org/pdf/astro-ph/9301001', crawlerOptions: { limit: 10, excludes: [ 'list/*', 'login', 'abs/*', 'static/*', 'about/*', 'archive/*' ] }});
|
||||
expect(crawlResponse.statusCode).toBe(200);
|
||||
|
||||
let isCompleted = false;
|
||||
@ -606,7 +606,7 @@ describe("E2E Tests for API Routes", () => {
|
||||
}
|
||||
expect(completedResponse.body.status).toBe('completed');
|
||||
expect(completedResponse.body).toHaveProperty('data');
|
||||
expect(completedResponse.body.data.length).toBeGreaterThan(1);
|
||||
expect(completedResponse.body.data.length).toEqual(1);
|
||||
expect(completedResponse.body.data).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
|
@ -80,7 +80,7 @@ export async function processPdfToText(filePath: string): Promise<string> {
|
||||
await new Promise((resolve) => setTimeout(resolve, 500)); // Wait for 0.5 seconds
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error fetching result:", error.data.detail || '');
|
||||
console.error("Error fetching result:", error || '');
|
||||
attempt++;
|
||||
await new Promise((resolve) => setTimeout(resolve, 500)); // Wait for 0.5 seconds before retrying
|
||||
// You may want to handle specific errors differently
|
||||
|
Loading…
Reference in New Issue
Block a user