Skip to main content

Test

We ensure the stability and the compatibility of guardoni with different strategies.

Jest tests

jest is the actual standard to test javascript projects and we use it to manage all the tests in our monorepo.

To run tests only for guardoni:

yarn guardoni test

Bash scripts

Sometimes, during the development, we need to mimic a flow using the CLI previously built and perform some actions like register the experiment csv and run the experiment.

For this purpose there are two different scripts located at platforms/guardoni/scripts that performs the above flow for a specific platform:

cd ./platforms/guardoni
# run test for `platform` "youtube" and `type` "home"
./scripts/cli-yt-test-home.mjs
# run test for `platform` "youtube" and `type` "video"
./scripts/cli-yt-test-videos.mjs
# run test for titkok platform
./scripts/cli-tk-test.sh