ETHTrust uses Waffle to compile and test smart contracts. Waffle is a library for writing and testing smart contracts.
-
Install waffle
yarn add --dev ethereum-waffle
-
Compile the contract
yarn build
-
Tests in waffle are written using Mocha alongside with Chai. You can use a different test environment, but Waffle matchers only work with chai. Run:
yarn add --dev mocha chai
-
Run your Tests:
yarn test