mtcute/e2e/node
2024-07-15 23:12:57 +03:00
..
.verdaccio chore: moved e2e to e2e/node 2024-04-22 00:05:08 +03:00
cjs fix(node)!: recursive crypto-node import 2024-04-27 12:19:08 +03:00
esm fix(node)!: recursive crypto-node import 2024-04-27 12:19:08 +03:00
ts fix(core): serializing Longs between worker and port 2024-07-15 23:12:57 +03:00
.dockerignore chore: moved e2e to e2e/node 2024-04-22 00:05:08 +03:00
.env.example test: initial e2e publishing testing for deno 2024-04-23 13:44:11 +03:00
.gitignore chore: moved e2e to e2e/node 2024-04-22 00:05:08 +03:00
.mocharc.json chore: moved e2e to e2e/node 2024-04-22 00:05:08 +03:00
cli.sh chore: moved e2e to e2e/node 2024-04-22 00:05:08 +03:00
config.js chore: moved e2e to e2e/node 2024-04-22 00:05:08 +03:00
docker-compose.yaml chore: moved e2e to e2e/node 2024-04-22 00:05:08 +03:00
docker-entrypoint.sh chore: moved e2e to e2e/node 2024-04-22 00:05:08 +03:00
Dockerfile.build test(e2e): fixed dockerfiles for py3.12 2024-05-28 14:44:16 +03:00
Dockerfile.test test(e2e): fixed dockerfiles for py3.12 2024-05-28 14:44:16 +03:00
package.json chore: moved e2e to e2e/node 2024-04-22 00:05:08 +03:00
pnpm-workspace.yaml chore: moved e2e to e2e/node 2024-04-22 00:05:08 +03:00
publish-canary.js chore: moved e2e to e2e/node 2024-04-22 00:05:08 +03:00
README.md chore: moved e2e to e2e/node 2024-04-22 00:05:08 +03:00
runner.js chore: moved e2e to e2e/node 2024-04-22 00:05:08 +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