mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-17 19:26:20 +00:00
* test setup, add initializer tests * test sending messages * add script to check latest version * add github action * use env vars * configure environment with .env file * add test for sticker name and author * add DownloadManager model * test chats and contacts * test for number utility functions * throw error if no remote id has been set * Update .version
Running tests
These tests require an authenticated WhatsApp Web session, as well as an additional phone that you can send messages to.
This can be configured using the following environment variables:
WWEBJS_TEST_SESSION: A JSON-formatted string with the session details. Must includeWABrowserId,WASecretBundle,WAToken1andWAToken2.WWEBJS_TEST_SESSION_PATH: Path to a JSON file that contains the session details. Must includeWABrowserId,WASecretBundle,WAToken1andWAToken2.WWEBJS_TEST_REMOTEID: A valid WhatsApp ID that you can send messages to, e.g.123456789@c.us.
You must set WWEBJS_TEST_REMOTEID and either WWEBJS_TEST_SESSION or WWEBJS_TEST_SESSION_PATH for the tests to run properly.