Practical example showing how to write Truffle tests async, instead of promise chaining
I used the default truffle init sample. Duplicated test/metacoin.js to test/asyncmetacoin.js, and refactored it to use async/await.
Requires Node 7.6+ or Node 8+ https://www.infoq.com/news/2017/02/node-76-async-await/
- Clone the repo
- Start TestRPC in another termainal
- Run
truffle test