JavaScript tests give us a way to fully test the behavior of a contract exactly as the client is going to see it. We have access to the test accounts, thanks to the web3 provider injected into the test runner, and you'll learn exactly what web3 is in Chapter 6, Day Six: Using Wallets.
Truffle uses the Mocha testing framework and Chai assertions for the JavaScript tests. If you've written JavaScript before, you may be familiar with Mocha; the only difference here is that Truffle uses the contract function instead of Mocha's described function. This enables the clean room feature mentioned previously, to ensure that we're starting with a fresh contract for each test suite.
Using the Chai Assertion Library is a nice touch, because it's the same assertion library used in our Solidity test, which makes our life as a blockchain developer a little bit easier. Now, let's dive into deploying contracts into a test network.