mtcute/e2e
2023-12-11 12:21:39 +03:00
..
.verdaccio ESM + end-to-end tests (#11) 2023-10-16 19:23:53 +03:00
cjs test(e2e): increased base-client timeout to 5min 2023-12-11 12:21:39 +03:00
esm test(e2e): increased base-client timeout to 5min 2023-12-11 12:21:39 +03:00
ts test(e2e): increased base-client timeout to 5min 2023-12-11 12:21:39 +03:00
.dockerignore ESM + end-to-end tests (#11) 2023-10-16 19:23:53 +03:00
.env.example ESM + end-to-end tests (#11) 2023-10-16 19:23:53 +03:00
.gitignore ESM + end-to-end tests (#11) 2023-10-16 19:23:53 +03:00
.mocharc.json ESM + end-to-end tests (#11) 2023-10-16 19:23:53 +03:00
cli.sh ci: release building 2023-11-01 01:03:49 +03:00
config.js ESM + end-to-end tests (#11) 2023-10-16 19:23:53 +03:00
docker-compose.yaml ESM + end-to-end tests (#11) 2023-10-16 19:23:53 +03:00
docker-entrypoint.sh ESM + end-to-end tests (#11) 2023-10-16 19:23:53 +03:00
Dockerfile.build ESM + end-to-end tests (#11) 2023-10-16 19:23:53 +03:00
Dockerfile.test ESM + end-to-end tests (#11) 2023-10-16 19:23:53 +03:00
package.json fix(e2e): added @types/node 2023-11-04 20:51:43 +03:00
pnpm-workspace.yaml ESM + end-to-end tests (#11) 2023-10-16 19:23:53 +03:00
README.md ESM + end-to-end tests (#11) 2023-10-16 19:23:53 +03:00
runner.js ESM + end-to-end tests (#11) 2023-10-16 19:23:53 +03:00

mtcute e2e tests

This directory contains end-to-end tests for mtcute.

They are made for 2 purposes:

  • Ensure published packages work as expected and can properly be imported
  • Ensure that the library works with the actual Telegram API (WIP)

To achieve the first goal, we use a Verdaccio container to publish the package to, and then install it from there in another container

Setting up

Before running the tests, you need to copy .env.example to .env and fill in the values

Running tests

To run tests, you need to have Docker installed.

# first start Verdaccio:
./cli.sh start

# build and publish the package
./cli.sh update
# or a particular package
./cli.sh update tl-runtime

# run the tests
./cli.sh run
# or in docker
./cli.sh run-docker

Developing

Once you have Verdaccio running, you can run the following commands to setup the environment for development:

npm config set -L project @mtcute:registry http://verdaccio.e2e.orb.local/
./cli.sh install

Replace the URL above with the one generated with your Docker GUI of choice (e2e > verdaccio > RMB > Open in browser). Example above assumes OrbStack

Then use ./cli.sh run to run the tests