Isolate smart contract tests with Truffle clean room features

Julien Klepatch

In Truffle tests, we have a mysterious contract() function:

contract('my test', () => {
  if('it should ...', () => {
  });
});

It’s Truffle replacement of Mocha describe() function, but with a twist: it defines a “clean room” and it’s used to isolate tests. Very few Truffle users, but this is important to understand this:

0 Comments

Leave a Reply

More great articles

Simple smart contract

Starting with Solidity smart contract is a bit overwhelming... the tools, the Ethereum Blockchain, the Solidity language... that's a lot…

Read Story

Crud – Part III

In the last part of this tutorial we finished all the functionalities of our smart contract. Unfortunately, we have a…

Read Story

Crud – Part II

We are going to continue our CRUD smart contract and finish the main features. You will learn: "Update" and "Destroy"…

Read Story

Never miss a minute

Get great content to your inbox every week. No spam.
[contact-form-7 id="6" title="Footer CTA Subscribe Form"]
Arrow-up