Add mocha, chai, and test for Contribution
This commit is contained in:
parent
1521e272f9
commit
59bda71f97
@ -1 +1,2 @@
|
|||||||
/scripts/
|
/scripts/
|
||||||
|
/test/
|
||||||
|
811
package-lock.json
generated
811
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -39,11 +39,13 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/67P/kredits-contracts#readme",
|
"homepage": "https://github.com/67P/kredits-contracts#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@nomicfoundation/hardhat-chai-matchers": "^1.0.3",
|
||||||
"@nomiclabs/hardhat-ethers": "^2.0.2",
|
"@nomiclabs/hardhat-ethers": "^2.0.2",
|
||||||
"@nomiclabs/hardhat-waffle": "^2.0.1",
|
"@nomiclabs/hardhat-waffle": "^2.0.1",
|
||||||
"@openzeppelin/contracts-upgradeable": "^4.3.2",
|
"@openzeppelin/contracts-upgradeable": "^4.3.2",
|
||||||
"@openzeppelin/hardhat-upgrades": "^1.10.0",
|
"@openzeppelin/hardhat-upgrades": "^1.10.0",
|
||||||
"async-each-series": "^1.1.0",
|
"async-each-series": "^1.1.0",
|
||||||
|
"chai": "^4.3.6",
|
||||||
"cli-table": "^0.3.1",
|
"cli-table": "^0.3.1",
|
||||||
"colors": "^1.0.3",
|
"colors": "^1.0.3",
|
||||||
"eslint": "^8.14.0",
|
"eslint": "^8.14.0",
|
||||||
@ -57,6 +59,7 @@
|
|||||||
"hardhat-deploy": "^0.11.4",
|
"hardhat-deploy": "^0.11.4",
|
||||||
"hardhat-deploy-ethers": "^0.3.0-beta.10",
|
"hardhat-deploy-ethers": "^0.3.0-beta.10",
|
||||||
"homedir": "^0.6.0",
|
"homedir": "^0.6.0",
|
||||||
|
"mocha": "^10.0.0",
|
||||||
"promptly": "^3.0.3",
|
"promptly": "^3.0.3",
|
||||||
"solhint": "^3.3.7",
|
"solhint": "^3.3.7",
|
||||||
"truffle-hdwallet-provider": "^1.0.17",
|
"truffle-hdwallet-provider": "^1.0.17",
|
||||||
|
19
test/Contribution.js
Normal file
19
test/Contribution.js
Normal 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);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user