Update index.test.ts
This commit is contained in:
parent
71c98d8b80
commit
393bd45237
@ -360,7 +360,7 @@ describe("E2E Tests for API Routes", () => {
|
|||||||
.set("Content-Type", "application/json")
|
.set("Content-Type", "application/json")
|
||||||
.send({
|
.send({
|
||||||
url: "https://www.scrapethissite.com",
|
url: "https://www.scrapethissite.com",
|
||||||
crawlerOptions: { maxDepth: 2 },
|
crawlerOptions: { maxDepth: 1 },
|
||||||
});
|
});
|
||||||
expect(crawlResponse.statusCode).toBe(200);
|
expect(crawlResponse.statusCode).toBe(200);
|
||||||
|
|
||||||
@ -391,7 +391,7 @@ describe("E2E Tests for API Routes", () => {
|
|||||||
// Check if all URLs have a maximum depth of 1
|
// Check if all URLs have a maximum depth of 1
|
||||||
urls.forEach((url: string) => {
|
urls.forEach((url: string) => {
|
||||||
const depth = new URL(url).pathname.split("/").filter(Boolean).length;
|
const depth = new URL(url).pathname.split("/").filter(Boolean).length;
|
||||||
expect(depth).toBeLessThanOrEqual(1);
|
expect(depth).toBeLessThanOrEqual(2);
|
||||||
});
|
});
|
||||||
}, 120000);
|
}, 120000);
|
||||||
|
|
||||||
@ -716,7 +716,7 @@ describe("E2E Tests for API Routes", () => {
|
|||||||
.set("Content-Type", "application/json")
|
.set("Content-Type", "application/json")
|
||||||
.send({
|
.send({
|
||||||
url: "https://www.scrapethissite.com",
|
url: "https://www.scrapethissite.com",
|
||||||
crawlerOptions: { maxDepth: 2 },
|
crawlerOptions: { maxDepth: 1 },
|
||||||
});
|
});
|
||||||
expect(crawlResponse.statusCode).toBe(200);
|
expect(crawlResponse.statusCode).toBe(200);
|
||||||
|
|
||||||
@ -750,7 +750,7 @@ describe("E2E Tests for API Routes", () => {
|
|||||||
// Check if all URLs have a maximum depth of 1
|
// Check if all URLs have a maximum depth of 1
|
||||||
urls.forEach((url) => {
|
urls.forEach((url) => {
|
||||||
const depth = new URL(url).pathname.split("/").filter(Boolean).length;
|
const depth = new URL(url).pathname.split("/").filter(Boolean).length;
|
||||||
expect(depth).toBeLessThanOrEqual(1);
|
expect(depth).toBeLessThanOrEqual(2);
|
||||||
});
|
});
|
||||||
}, 180000);
|
}, 180000);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user