Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
memdown tests weren't needed
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmurdoch committed Jan 16, 2020
1 parent 8ef1184 commit 1bfbfb7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
23 changes: 12 additions & 11 deletions test/gas/gas.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const memdown = require("memdown");
const assert = require("assert");
const bootstrap = require("../helpers/contract/bootstrap");
const confirmGasPrice = require("./lib/confirmGasPrice");
Expand Down Expand Up @@ -33,8 +32,7 @@ describe("Gas", function() {

const ganacheProviderOptions = {
seed,
hardfork,
db: memdown() // make things faster
hardfork
};

context = await bootstrap(contractRef, ganacheProviderOptions, hardfork);
Expand All @@ -61,13 +59,16 @@ describe("Gas", function() {
const sendContract = Object.assign({ contractFiles: ["SendContract"] }, subDirectory);
const nonZero = Object.assign({ contractFiles: ["NonZero"] }, subDirectory);

const getOpts = () => Object.assign({ db: memdown() }, { seed, hardfork });
const ganacheProviderOptions = {
seed,
hardfork
};

ContractFactory = await bootstrap(factory, getOpts(), hardfork);
TestDepth = await bootstrap(testDepth, getOpts(), hardfork);
Donation = await bootstrap(donation, getOpts(), hardfork);
Fib = await bootstrap(fib, getOpts(), hardfork);
NonZero = await bootstrap(nonZero, getOpts(), hardfork);
ContractFactory = await bootstrap(factory, ganacheProviderOptions, hardfork);
TestDepth = await bootstrap(testDepth, ganacheProviderOptions, hardfork);
Donation = await bootstrap(donation, ganacheProviderOptions, hardfork);
Fib = await bootstrap(fib, ganacheProviderOptions, hardfork);
NonZero = await bootstrap(nonZero, ganacheProviderOptions, hardfork);
SendContract = await bootstrap(
sendContract,
Object.assign(
Expand All @@ -79,12 +80,12 @@ describe("Gas", function() {
}
]
},
getOpts()
ganacheProviderOptions
),
hardfork
);
if (hardfork !== "byzantium") {
Create2 = await bootstrap(create2, getOpts(), hardfork);
Create2 = await bootstrap(create2, ganacheProviderOptions, hardfork);
}
});

Expand Down
6 changes: 1 addition & 5 deletions test/interval-mining.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const initializeTestProvider = require("./helpers/web3/initializeTestProvider");
const { compile } = require("./helpers/contract/compileAndDeploy");
const generateRandomInteger = require("./helpers/utils/generateRandomInteger");
const seed = generateRandomInteger(1000000);
const memdown = require("memdown");

describe("Interval Mining", function() {
let firstAddress;
Expand All @@ -15,10 +14,7 @@ describe("Interval Mining", function() {
before("Setting up provider and web3 instance", async function() {
context = await initializeTestProvider({
blockTime: 0.5, // seconds
seed,
// speed things up since travis has problems with
// this test because of disk IO being slow at times.
db: memdown()
seed
});
firstAddress = context.accounts[0];
});
Expand Down

0 comments on commit 1bfbfb7

Please sign in to comment.