Writing Tests
Just as in any programming project, it is vital to write expansive test suites to make sure the the program acts as expected. Truffle comes with ability to write such unit tests in both Solidity and in Javascript.
Testing Your Contracts - Truffle Documentation [1 min read]
This short section from the Truffle Docs explains a little about the testing process and how it fits into the overall Truffle development process.
Writing tests in JavaScript - Truffle Documentation [4 min read]
This section describes how Truffle uses the Mocha framework to allow developers to write their unit tests in Javascript.
Writing tests in Solidity - Truffle Documentation [4 min read]
If at this point you are in love with Solidity (as you should be), and want to write your units tests in it too, Truffle offers support to do this as well. This is extremely useful because you can test how smart contracts will interact with each other instead of just with Web3.
Testing for Throws in Truffle Solidity Tests - Simon de La Rouviere, Truffle Tutorials [5 min read]
This tutorial from Truffle shows how to use test for throws within smart contract execution.