Skip to content

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

Caleb: added a test to ensure links on page exists and isn't zero on mendable

Caleb Peffer98c788ca7a0a
diff --git a/apps/api/src/scraper/WebScraper/__tests__/single_url.test.ts b/apps/api/src/scraper/WebScraper/__tests__/single_url.test.ts
index 7966648b6..63408eaf8 100644
--- a/apps/api/src/scraper/WebScraper/__tests__/single_url.test.ts
+++ b/apps/api/src/scraper/WebScraper/__tests__/single_url.test.ts
@@ -22,3 +22,17 @@ describe('scrapSingleUrl', () => {
}, 10000);
});
+
+it('should return a list of links on the mendable.ai page', async () => {
+ const url = 'https://mendable.ai';
+ const pageOptions: PageOptions = { includeHtml: true };
+
+ const result = await scrapSingleUrl(url, pageOptions);
+
+ // Check if the result contains a list of links
+ expect(result.linksOnPage).toBeDefined();
+ expect(Array.isArray(result.linksOnPage)).toBe(true);
+ expect(result.linksOnPage.length).toBeGreaterThan(0);
+}, 10000);
+
+