Nick: fixed tests

This commit is contained in:
Nicolas 2024-07-30 19:11:01 -04:00
parent a28ecc1f61
commit 6d99dedd3c
2 changed files with 4 additions and 3 deletions

View File

@ -23,8 +23,8 @@ describe('scrapSingleUrl', () => {
}, 10000); }, 10000);
}); });
it('should return a list of links on the mendable.ai page', async () => { it('should return a list of links on the firecrawl.ai page', async () => {
const url = 'https://mendable.ai'; const url = 'https://example.com';
const pageOptions: PageOptions = { includeHtml: true }; const pageOptions: PageOptions = { includeHtml: true };
const result = await scrapSingleUrl("TEST", url, pageOptions); const result = await scrapSingleUrl("TEST", url, pageOptions);
@ -33,5 +33,5 @@ it('should return a list of links on the mendable.ai page', async () => {
expect(result.linksOnPage).toBeDefined(); expect(result.linksOnPage).toBeDefined();
expect(Array.isArray(result.linksOnPage)).toBe(true); expect(Array.isArray(result.linksOnPage)).toBe(true);
expect(result.linksOnPage.length).toBeGreaterThan(0); expect(result.linksOnPage.length).toBeGreaterThan(0);
expect(result.linksOnPage).toContain('https://mendable.ai/blog') expect(result.linksOnPage).toContain('https://www.iana.org/domains/example')
}, 10000); }, 10000);

View File

@ -81,6 +81,7 @@ export async function scrapWithFireEngine({
timeout: universalTimeout + waitParam, timeout: universalTimeout + waitParam,
} }
); );
console.log(response.data?.pageStatusCode);
if (response.status !== 200) { if (response.status !== 200) {
Logger.debug( Logger.debug(