Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Truffle Quick Start Guide

You're reading from  Truffle Quick Start Guide

Product type Book
Published in Jun 2018
Publisher Packt
ISBN-13 9781789132540
Pages 170 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Nikhil Bhaskar Nikhil Bhaskar
Profile icon Nikhil Bhaskar

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 $15.99/month. Cancel anytime}