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 test

Ondra Urbana0152e0cdeee
diff --git a/test/utils.test.js b/test/utils.test.js
index 8def7d9f5..6c479b971 100644
--- a/test/utils.test.js
+++ b/test/utils.test.js
@@ -14,13 +14,13 @@ import * as requestUtils from '../build/utils_request';
describe('utils.newClient()', () => {
test('reads environment variables correctly', () => {
- process.env[ENV_VARS.API_BASE_URL] = 'http://www.example.com:1234/path/';
+ process.env[ENV_VARS.API_BASE_URL] = 'http://www.example.com:1234/path';
process.env[ENV_VARS.TOKEN] = 'token';
const client = utils.newClient();
expect(client.constructor.name).toBe('ApifyClient');
expect(client.token).toBe('token');
- expect(client.baseUrl).toBe('http://www.example.com:1234/path/');
+ expect(client.baseUrl).toBe('http://www.example.com:1234/path');
});
test('uses correct default if APIFY_API_BASE_URL is not defined', () => {