ERC-20 Token Test Suite
Package to test your ERC-20 token implementation from your truffle projects.
This package offers the reusable tests for your final ERC-20 token implementations. This suite will tests whether your token conforms to the ERC-20 standard.
Installation
npm install --save-dev token-test-suite
Getting Started
The test suite assumes it is ran from the truffle's contract
function (see docs). That ensures that mocha
and chai
is visible in the test suite.
Create the file test/MyToken.erc20.js
and just add initialization boilerplate. It should look like this:
const suite = ;const MyToken = artifacts; ;
Then run:
truffle test ./test/MyToken.erc20.js
You should get:
More
The library won't test any additional logic your token might implement. It expects "classical" token behavior. All test assume, that tokens are fully transferrable. If you implement vesting period or freeze times, maybe specifying before/after custom callbacks in options might help. If not, perhaps the standardized tests are not for you and you might just copy/paste and customize them.
License
The library is released under the MIT license.