Can someone help me understand why there's 2 tests in the test directory when using Truffle, for the default configuration?

There's metacoin.js and TestMetaCoin.sol.

What can one test with metacoin.js (or Javascript in general) that you cannot achieve with TestMetaCoin.sol (Solidity contracts) and vice versa?

1 Answer 1


Truffle allows you to test your contracts either in JS or Solidity. They explain the benefits of running the tests in each language in their docs: http://truffleframework.com/docs/getting_started/testing

In terms of what can be tested, there's no difference, just a matter of preference regarding what language and tools you feel more comfortable using for writing and running the tests.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.