whatsapp-web.js/tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Maksim Koryukov 211205363c
fix(deps): upgrade eslint and plugins to 9.39.4 (#201701)
* fix(deps): upgrade eslint and plugins to 10.2.0

* chore: manual lint-fix

* chore: automatic lint-fix

* feat(repo): github actions - lint - use node v24

because it is linting (not runtime), so why not
to use the latest stable Node version

* fix: remove @stylistic/eslint-plugin (in favor of prettier)

* fix: eslint uses `ecmaVersion` 2025

* fix: eslint's "mocha" config is isolated (for test files only)

for example `describe` is not considered "global" outside the
test files. the same for all other "eslint/mocha" rules -
they are applied only to files in `/tests` folder.

* chore: update package-lock.json after eslint upgrade
2026-04-18 17:50:05 -03:00
..
structures fix(deps): upgrade eslint and plugins to 9.39.4 (#201701) 2026-04-18 17:50:05 -03:00
client.js fix(deps): upgrade eslint and plugins to 9.39.4 (#201701) 2026-04-18 17:50:05 -03:00
helper.js chore: cleanup, ci workflows and formatting (#127064) 2026-03-10 01:45:12 +02:00
README.md chore: cleanup, ci workflows and formatting (#127064) 2026-03-10 01:45:12 +02:00

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_CLIENT_ID: clientId to use for local file based authentication (required for authenticated tests).
  • WWEBJS_TEST_REMOTE_ID: A valid WhatsApp ID that you can send messages to, e.g. 123456789@c.us. It should be different from the ID used by the provided session (required).

You can create a .env file in the root directory with these variables. See .env.example for a template.

To run the tests:

npm test