fbpx

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

Testing integers in smart contract with Truffle and bn.js (Big Number)

In Solidity smart contract, you might have to deal with huge numbers, especially when doing financial transfers. Don't forget that…

Read Story

Debugging with syntax highlighting

To debug syntax errors, you can rely on Solidity syntax highlighting. Fortunately for us, Remix has syntax highlighting activated by…

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