Jest and testing smart contracts without Truffle

Hi,

Thanks to the awesome openzeppelin-test-environment, I was able to use Jest + power-assert instead of Truffle + Mocha + Chai for testing smart contracts.

Truffle has issues with inversion of control (you need to use their test runner), magical globals that play badly with TypeScript and difficult of integration with larger JavaScript testing ecosystem. Thanks to OpenZeppelin, one no longer depend on Truffle to set up magic behind the scenes (artefacts), but you can do it from any JavaScript unit test.

Read instructions in this ethereum.stackexchange.com post. For example, one does not need to remember Chai expect.toBe.veryDifficult() syntax anymore.

2 Likes

Hi @miohtama,

Thanks for sharing the positive feedback :pray: