Getting Started
Hydra is an EOSIO smart contract testing framework that allows you to quickly get started with testing your smart contract code. Besides Hydra, installing additional software or running your own local blockchain node is not required.
#
Quick Start#
SetupHydra is a Node.js library, so make sure Node.js/NPM is installed.
Log in to your existing Klevoya account or sign up by running the login
command and following the instructions:
#
Writing testsHydra tests are written in JavaScript/TypeScript using a JavaScript testing library of your choice.
Navigate to your contract project's root folder and compile your smart contract.
After that, run the hydra init
command selecting the contracts you want to test.
It will initialize an NPM project and set up a JavaScript testing library (jest).
The init
command also bootstraps your project by creating a hydra.yml
configuration file and a test boilerplate in the tests
directory.
Then run your tests: