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
chore(e2e): fix faulty assertion in `storage-open-return-storage-object` e2e test (#3253)
Jindřich Bäre8ea3e2ea78b
diff --git a/test/e2e/storage-open-return-storage-object/actor/main.js b/test/e2e/storage-open-return-storage-object/actor/main.jsindex 88ed1479c..cf8d7154d 100644--- a/test/e2e/storage-open-return-storage-object/actor/main.js+++ b/test/e2e/storage-open-return-storage-object/actor/main.js@@ -1,4 +1,4 @@-import { Actor, KeyValueStore, Dataset } from 'apify';+import { Actor, Dataset, KeyValueStore } from 'apify';const mainOptions = {exit: Actor.isAtHome(),diff --git a/test/e2e/storage-open-return-storage-object/test.mjs b/test/e2e/storage-open-return-storage-object/test.mjsindex 1ff6a89cd..ed808f241 100644--- a/test/e2e/storage-open-return-storage-object/test.mjs+++ b/test/e2e/storage-open-return-storage-object/test.mjs@@ -25,9 +25,12 @@ const datasetStorageObject = parsed.datasetStorageObject;const keyValueStorageObject = parsed.keyValueStorageObject;await expect(datasetStorageObject.id !== null, 'datasetStorageObject contains id');-await expect(datasetStorageObject.name !== null, 'datasetStorageObject contains name');+await expect(+ [null, 'default'].includes(datasetStorageObject.name),+ 'Default dataset\'s name is either "default" or null',+);await expect(datasetStorageObject.userId !== null, 'datasetStorageObject contains userId');await expect(keyValueStorageObject.id !== null, 'keyValueStorageObject contains id');-await expect(keyValueStorageObject.name !== null, 'keyValueStorageObject contains name');+await expect([null, 'default'].includes(keyValueStorageObject.name), 'Default KVS\'s name is either "default" or null');await expect(keyValueStorageObject.userId !== null, 'keyValueStorageObject contains userId');