Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

fix(api): pdf bug + testing bugs (#1704)

Gergő Móricze7a62dd4902b
diff --git a/apps/api/src/__tests__/snips/crawl.test.ts b/apps/api/src/__tests__/snips/crawl.test.ts
index 6690926bc..8903458a3 100644
--- a/apps/api/src/__tests__/snips/crawl.test.ts
+++ b/apps/api/src/__tests__/snips/crawl.test.ts
@@ -41,7 +41,7 @@ describe("Crawl tests", () => {
}
}, 120000);
- it.only("delay parameter works", async () => {
+ it.concurrent("delay parameter works", async () => {
await crawl({
url: "https://firecrawl.dev",
limit: 3,
diff --git a/apps/api/src/__tests__/snips/scrape.test.ts b/apps/api/src/__tests__/snips/scrape.test.ts
index 09b10c77d..77944e7f6 100644
--- a/apps/api/src/__tests__/snips/scrape.test.ts
+++ b/apps/api/src/__tests__/snips/scrape.test.ts
@@ -121,7 +121,7 @@ describe("Scrape tests", () => {
// }, 30000);
// });
- describe.only("Index", () => {
+ describe("Index", () => {
it.concurrent("caches properly", async () => {
const id = crypto.randomUUID();
const url = "https://firecrawl.dev/?testId=" + id;
@@ -369,7 +369,7 @@ describe("Scrape tests", () => {
expect(response2.metadata.cacheState).toBe("miss");
}, scrapeTimeout * 2 + 1 * indexCooldown);
- it.only("respects location", async () => {
+ it.concurrent("respects location", async () => {
const id = crypto.randomUUID();
const url = "https://firecrawl.dev/?testId=" + id;
diff --git a/apps/api/src/scraper/scrapeURL/engines/fire-engine/index.ts b/apps/api/src/scraper/scrapeURL/engines/fire-engine/index.ts
index c10b8820f..fcd366918 100644
--- a/apps/api/src/scraper/scrapeURL/engines/fire-engine/index.ts
+++ b/apps/api/src/scraper/scrapeURL/engines/fire-engine/index.ts
@@ -282,7 +282,7 @@ export async function scrapeURLWithFireEngineChromeCDP(
screenshots: response.screenshots ?? [],
scrapes: response.actionContent ?? [],
javascriptReturns: (response.actionResults ?? []).filter(x => x.type === "executeJavascript").map(x => JSON.parse((x.result as any as { return: string }).return)),
- pdfs: (response.actionResults ?? []).filter(x => x.type === "pdf").map(x => JSON.parse((x.result as any as { link: string }).link)),
+ pdfs: (response.actionResults ?? []).filter(x => x.type === "pdf").map(x => x.result.link),
},
}
: {}),