Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

Fix flaky test

Ondra Urban087f7dc46480
diff --git a/test/request.test.js b/test/request.test.js
index ff5276fe8..b1b8c441e 100644
--- a/test/request.test.js
+++ b/test/request.test.js
@@ -127,7 +127,7 @@ describe('Apify.Request', () => {
const durationMillis = Date.now() - start;
// Under normal load, the Requests are created in ~25-30ms
// In tests the load is high, so we only check if it doesn't
- // overshoot some crazy range like 100ms.
- expect(durationMillis).toBeLessThan(100);
+ // overshoot some crazy range like 500ms.
+ expect(durationMillis).toBeLessThan(500);
});
});