0

Truffle v5.0.8 (core: 5.0.8) Solidity v0.5.0 (solc-js) Node v10.13.0 Web3.js v1.0.0-beta.37

Assert.equal worked in Truffle 4.x.

pragma solidity >=0.4.21 <0.6.0;


import "truffle/Assert.sol";
import "truffle/DeployedAddresses.sol";
import "../contracts/Funding.sol";

uint public initialBalance = 10 ether;
Funding funding;

function () external payable {}

function beforeEach() public {
    funding = new Funding();
}

function testSettingAnOwnerDuringCreation() public {
    Assert.equal(funding.owner(), this, "Owner should be the same as deployer.");
}
  • 1
    Why don't you simply open file Assert.sol and find out? – goodvibration Mar 20 at 14:37
  • I believe it's dynamically generated - or, at any rate it's not on disk. As far as I can tell this seems to have something to do with Visual Studio Code Solidity extension. It was working fine under a previous version of truffle. But if I roll back then another project I have won't compile. – Kevin McFarlane Mar 22 at 13:51
  • Check under /node_modules/truffle-contract. – goodvibration Mar 22 at 15:08
  • That folder doesn't exist. I'm on windows btw. – Kevin McFarlane Mar 25 at 15:44
  • Well, what Truffle-related folders do you have under node_modules then? – goodvibration Mar 25 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.