Testing the TaskMaster 

Under the test folder, you should already see two test files, one in JavaScript and one in Solidity. These were the files that came out of the box when we initialized our Truffle project. Since we have a TaskMaster contract and not a MetaCoin contract, feel free to delete those two test files. Let's start from scratch.

Your test folder should now be empty.

Now, inside the test folder, create a new file called TestTaskMaster.sol

It is good practice to prefix your Solidity test files with Test before the name of the contract you are testing. So, if you are testing a contract called TaskMaster, it is good practice to name your test contract TestTaskMaster.

Start by adding a few necessary Truffle imports, including ...

Get Truffle Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.