chore: cleanup, ci workflows and formatting (#127064)
* ci: setup workflows, dependabot, labeler and commit linting * docs: update README, community files and issue templates * chore: configure prettier, editorconfig and format codebase * chore: restore changes lost during rebase * docs: adjust url for new logo * fix: align badges * chore: resolve conflicts and re-add temp lint
This commit is contained in:
parent
c2d978fd0a
commit
807efd502d
1 changed files with 6790 additions and 3547 deletions
|
|
@ -1,14 +1,16 @@
|
|||
## Running tests
|
||||
# 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 legacy auth session details. Must include `WABrowserId`, `WASecretBundle`, `WAToken1` and `WAToken2`.
|
||||
- `WWEBJS_TEST_SESSION_PATH`: Path to a JSON file that contains the legacy auth session details. Must include `WABrowserId`, `WASecretBundle`, `WAToken1` and `WAToken2`.
|
||||
- `WWEBJS_TEST_CLIENT_ID`: `clientId` to use for local file based authentication.
|
||||
- `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.
|
||||
|
||||
You *must* set `WWEBJS_TEST_REMOTE_ID` **and** either `WWEBJS_TEST_SESSION`, `WWEBJS_TEST_SESSION_PATH` or `WWEBJS_TEST_CLIENT_ID` for the tests to run properly.
|
||||
- `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).
|
||||
|
||||
### Multidevice
|
||||
Some of the tested functionality depends on whether the account has multidevice enabled or not. If you are using multidevice, you should set `WWEBJS_TEST_MD=1`.
|
||||
You can create a `.env` file in the root directory with these variables. See `.env.example` for a template.
|
||||
|
||||
To run the tests:
|
||||
|
||||
```bash
|
||||
npm test
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in a new issue