-
Notifications
You must be signed in to change notification settings - Fork 1
Installation Instructions (Coding Exercises)
Nils-Erik Frantzell edited this page Mar 28, 2018
·
3 revisions
Running the tests requires NodeJS, Truffle (version 3.4.7), and TestRPC(included with Truffle).
- Install NodeJS
- Install Truffle 3.4.7 (which includes TestRPC):
npm install -g truffle@3.4.7
Note: The course recommends v3.4.7 since v4.0 was still fairly new when the course was created and had some issues
- Create a new local directory and run the following command to create a new Truffle project:
truffle init
-
(If on Windows) Rename
truffle.js
->truffle-config.js
- Copy the smart contracts to the
contracts
directory - Copy the test files to the
test
directory - Copy the Truffle deployment file to the
migrations
directory - Run TestRPC (Ethereum test RPC client) by executing the
testrpc
command in a console - Compile the smart contracts and run a specific set of tests:
Truffle test test/<test file name>
For example:
Truffle test test/MultiNumberBettingV5.js