yarn install
yarn docker:up
yarn test
# Start a thor solo instance so your tests can run quickly
yarn docker:solo:up
# Run a single test / test suite
yarn test -t 'GET /accounts/{address}/storage'
- You can specify a custom docker image by running the following in the vechain/thor repo:
docker build -t vechain/thor:custom .
export THOR_IMAGE=vechain/thor:custom
yarn docker:up
yarn test
yarn test -test <group/test>
--nodeURL http://localhost:8669
This is added to be able to configure the url of the client for future network hub integration. We need to keep same genesis for now.
- These scripts will output the Open API Spec to
./src/open-api-types.ts
yarn generate:openapi ./thor.yaml
yarn generate:openapi https://raw.githubusercontent.com/vechain/thor/master/api/doc/thor.yaml
Tests are executed using a custom private thor blockchain. The genesis of this blockchain is defined in genesis.json
.
This file contains accounts that are created with defined VET/VTHO balance for testing purposes. These accounts are used
as a faucet. Please refer to:
./src/wallet.ts
to generate new accounts/ private keys./src/account-faucet.ts
to fund your accounts with VET/VTHO
- thorest-api --> Tests that validate the swagger contract definition of the Thorest api