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.
TypeScript apifyautomationcrawlercrawlingheadlessheadless-chromejavascriptnodejsnpmplaywrightpuppeteerscraperscrapingtypescriptweb-crawlerweb-crawlingweb-scraping
Update dataset.js
Marek Trunkátbfb27e76c543
diff --git a/test/dataset.js b/test/dataset.jsindex 3b5e2e865..45428a83a 100644--- a/test/dataset.js+++ b/test/dataset.js@@ -319,7 +319,7 @@ describe('dataset', () => {const mockData = bytes => 'x'.repeat(bytes);it('should succesfully save simple data', async () => {- const dataset = new Dataset('some-id', 'some-name');+ const dataset = new Dataset('some-id');const mock = sinon.mock(apifyClient.datasets);mock.expects('putItems')@@ -351,7 +351,9 @@ describe('dataset', () => {it('should successfully save large data', async () => {const half = mockData(MAX_PAYLOAD_SIZE_BYTES / 2);- const dataset = new Dataset('some-id', 'some-name');+ const dataset = new Dataset('some-id',++ );const mock = sinon.mock(apifyClient.datasets);mock.expects('putItems')@@ -387,7 +389,7 @@ describe('dataset', () => {const expectedFirst = JSON.stringify(Array(count - 1).fill(chunk));const expectedSecond = JSON.stringify([chunk]);- const dataset = new Dataset('some-id', 'some-name');+ const dataset = new Dataset('some-id');const mock = sinon.mock(apifyClient.datasets);mock.expects('putItems')@@ -415,7 +417,7 @@ describe('dataset', () => {it('should throw on too large file', async () => {const mock = sinon.mock(apifyClient.datasets);const full = mockData(MAX_PAYLOAD_SIZE_BYTES);- const dataset = new Dataset('some-id', 'some-name');+ const dataset = new Dataset('some-id');try {await dataset.pushData({ foo: full });throw new Error('Should fail!');