Truffle v5.0.5 (core: 5.0.5)
Solidity v0.5.0 (solc-js)
Node v10.15.1
ReferenceError: address is not defined.
const ApprovalContracts = artifacts.require('../../contracts/ApprovalContracts.sol'); // Pulls in my smart contract // the accounts are the 10 dummie ones
// the require pulls in the smart contract // the artifacts pulls in our code
contract ('ApprovalContracts', function (accounts) { // These are the accounts stored locally in the server the address
//tests in javascript part of the contract //setup a contract and getting back the approver //takes a deposit im going to look and see what the balance is
it('initiates contract', async function() {
const contract = await ApprovalContracts.deployed();
const approver = await contract.approver.call();
assert.equal(approver, 0xc7780C9521C2C2abED69f0D65BEbF9794C55ae94, "approvers don't match");
});
it('takes a deposit', async function() {
const balance = await web3.eth.getBalance(address.contract); -----> ReferenceError: address is not defined
const expected = web3.utils.toBN(1e+18);
assert.equal(balance.toString(), expected.toString(), "amount did not match");
});
});
Any advice I would be much appreciated.
const balance = await web3.eth.getBalance(address.contract);