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

This commit is contained in:
Caleb Peffer 2024-07-16 21:13:52 -07:00
parent d39d3be649
commit 98c788ca7a

View File

@ -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);