Running Tests
esy
has primarily 3 kinds of tests.
- Unit tests - useful when developing parsers etc
- Slow end-to-end tests
- Fast end-to-end tests
Unit Tests
These are present inline in the *.re
files. To run them,
esy b dune runtest
Fast end-to-end tests
These are present in test-e2e
folder and are written in JS. They're run by jest
yarn jest
Slow end-to-end tests
They're present in test-e2e-slow
and are written in JS. They're supposed to mimick the user's workflow
as closely as possible.
By placing @slowtest
token in commit messages, we mark the commit ready for the slow tests framework
(tests that hit the network). They are run with node test-e2e-slow/run-slow-tests.js
Windows
In cases e2e tests fail with Host key verification failed.
, you might have to create ssh keys
in the cygwin shall and add them to your github profile.
- Enter cygwin installed by esy (not the global one)
.\node_modules\esy-bash\re\_build\default\bin\EsyBash.exe bash
- Generate ssh keys
ssh-keygen
-
Add the public key to you Github profile
-
Add the following to the bash rc of the cygwin instance
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa