mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-05 15:10:47 +08:00
Nick: fixed tests
This commit is contained in:
parent
a28ecc1f61
commit
6d99dedd3c
@ -23,8 +23,8 @@ describe('scrapSingleUrl', () => {
|
||||
}, 10000);
|
||||
});
|
||||
|
||||
it('should return a list of links on the mendable.ai page', async () => {
|
||||
const url = 'https://mendable.ai';
|
||||
it('should return a list of links on the firecrawl.ai page', async () => {
|
||||
const url = 'https://example.com';
|
||||
const pageOptions: PageOptions = { includeHtml: true };
|
||||
|
||||
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(Array.isArray(result.linksOnPage)).toBe(true);
|
||||
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);
|
||||
|
@ -81,6 +81,7 @@ export async function scrapWithFireEngine({
|
||||
timeout: universalTimeout + waitParam,
|
||||
}
|
||||
);
|
||||
console.log(response.data?.pageStatusCode);
|
||||
|
||||
if (response.status !== 200) {
|
||||
Logger.debug(
|
||||
|
Loading…
x
Reference in New Issue
Block a user