From eb2e8f6a50f65b1149764a6e78bb9b608bf391cd Mon Sep 17 00:00:00 2001 From: mbeylin Date: Tue, 24 Oct 2017 15:20:10 -0400 Subject: [PATCH] updates to tests --- test/standardBountyMany.js | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/test/standardBountyMany.js b/test/standardBountyMany.js index 38378b0..bd0864c 100644 --- a/test/standardBountyMany.js +++ b/test/standardBountyMany.js @@ -197,12 +197,12 @@ contract('StandardBounties', function(accounts) { } } }); - it("[BOTH] Verifies that I can issue, activate, fulfill many times, accept, and pay out new bounties paying in both ETH and Tokens", async (done) => { + it("[BOTH] Verifies that I can issue, activate, fulfill many times, accept, and pay out new bounties paying in both ETH and Tokens", async () => { let registry = await StandardBounties.new(accounts[0]); let bountyToken = await HumanStandardToken.new(1000000000, "Bounty Token", 18, "BOUNT", {from: accounts[0]}); - for (var i = 0; i < 100; i++){ + for (var i = 0; i < 10; i++){ if (i % 2){ await registry.issueBounty(accounts[0], 2528821098, @@ -216,13 +216,13 @@ contract('StandardBounties', function(accounts) { await registry.activateBounty(i,1000, {from: accounts[0]}); - for (var j = 0; j < 10; j++){ + for (var j = 0; j < 50; j++){ await registry.fulfillBounty(i, "data", {from: accounts[1]}); var numFul = await registry.getNumFulfillments(i); assert(numFul == (j+1)); } - var random = Math.floor(Math.random() * 9); + var random = Math.floor(Math.random() * 49); await registry.acceptFulfillment(i,random,{from: accounts[0]}); var bounty = await registry.getBounty(i); @@ -241,24 +241,21 @@ contract('StandardBounties', function(accounts) { await registry.activateBounty(i,1000, {from: accounts[0], value: 1000}); - for (var j = 0; j < 10; j++){ + for (var j = 0; j < 50; j++){ await registry.fulfillBounty(i, "data", {from: accounts[1]}); var numFul = await registry.getNumFulfillments(i); assert(numFul == (j+1)); } - var random = Math.floor(Math.random() * 9); + var random = Math.floor(Math.random() * 49); await registry.acceptFulfillment(i,random,{from: accounts[0]}); var bounty = await registry.getBounty(i); assert(bounty[5] == 0); - - - } } - }).timeout(10000000000); + }); it("[BOTH] Verifies that I can issue, activate, fulfill, accept, and pay out new bounties paying in both ETH and Tokens from various addresses, with various token contracts", async () => {