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

ToDo List Ethereum Dapp (Step9) | Toggle Task Done & Keep Frontend Updated

This tutorial is part of the series ToDo List Ethereum Dapp. This is the Step 9. Tutorials already published: (more…)

Read Story

Loan state machine in Solidity

In this video we will create a loan smart contract with Solidity. There will be 2 kind of parties interacting…

Read Story

Understanding Truffle variable injection magic in test files

In Truffle, when you write tests, you can use 'artifacts' and 'web3' objects, without defining these names: const MyContract =…

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