Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Truffle Quick Start Guide

You're reading from   Truffle Quick Start Guide Learn the fundamentals of Ethereum development

Arrow left icon
Product type Paperback
Published in Jun 2018
Publisher Packt
ISBN-13 9781789132540
Length 170 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Nikhil Bhaskar Nikhil Bhaskar
Author Profile Icon Nikhil Bhaskar
Nikhil Bhaskar
Arrow right icon
View More author details
Toc

Testing Your Dapp

This chapter will introduce you to the importance of thoroughly testing your smart contracts, as well as various techniques and approaches for successfully testing a Truffle application. Specifically, this chapter will cover how to write comprehensive unit tests in Solidity and JavaScript, as well as the correct method for testing modifiers and reverts. Moreover, this chapter will illustrate how to test for events being thrown in your Solidity contract too. You will also learn about fundamental concepts, such as transaction objects and parameters, when working with truffle-contract and web3.

In particular, you will learn how to do the following:

  • Write comprehensive unit tests in Solidity
  • Write comprehensive unit tests in JavaScript
  • Test Solidity events

Unit tests are a great way to test whether your contract works as expected, rather than learning the hard...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime