Add mocha, chai, and test for Contribution

This commit is contained in:
Râu Cao
2022-08-23 10:41:46 +01:00
parent 1521e272f9
commit 59bda71f97
4 changed files with 701 additions and 133 deletions

19
test/Contribution.js Normal file
View File

@@ -0,0 +1,19 @@
const { expect } = require("chai");
const { ethers, upgrades } = require("hardhat");
let hardhatContribution;
describe("Contribution contract", function () {
describe("Deployment", function () {
before(async function () {
// const [owner] = await ethers.getSigners();
const Contribution = await ethers.getContractFactory("Contribution");
hardhatContribution = await upgrades.deployProxy(Contribution, [40321]);
});
it("sets the veto confirmation period", async function () {
expect(await hardhatContribution.blocksToWait()).to.equal(40321);
});
});
});