const utils = require("../utils/testUtils.js") // TODO: This a very minimal set of tests purely for understanding the contract. I think they can be used though. describe("DelegationProxy", async function() { this.timeout(0); //Initialize global/common contracts for all tests let accounts = []; let delegationProxy = [] let delegateTo = [[],[]] let delegationOf = [[],[]] let delegatedInfluence = [[],[]] let influence = [[],[]] let tokensBalance; before(function(done) { var contractsConfig = { "MiniMeTokenFactory": { }, "MiniMeToken": { "args": [ "$MiniMeTokenFactory", utils.zeroAddress, 0, "TestMiniMeToken", 18, "TST", true ] }, "DelegationProxy": { "args": [ 0 ] }, "ChildDelegationProxy": { "instanceOf": "DelegationProxy", "args": [ "$DelegationProxy" ] } }; EmbarkSpec.deployAll(contractsConfig, async function(accountsArr) { accounts = accountsArr delegationProxy[0] = DelegationProxy delegationProxy[1] = ChildDelegationProxy delegateTo = [ [ accounts[1], accounts[2], 0x0 ], [ 0x0, accounts[2], 0x0 ] ] delegationOf = [ [ accounts[2], accounts[2], accounts[2] ], [ accounts[0], accounts[2], accounts[2] ] ] delegatedInfluence = [ [0, 1, 2], [0, 0, 1] ] influence = [ [0, 0, 3], [1, 0, 2] ] tokensBalance = 1000 for(i=0;i