fix test timeout

This commit is contained in:
Ricardo Guilherme Schmidt 2023-06-26 23:11:48 -03:00
parent 82ebd1301e
commit a53cbb07ac
No known key found for this signature in database
GPG Key ID: 3F95A3AD0B607030
2 changed files with 8 additions and 4 deletions

View File

@ -3,4 +3,7 @@ require("@nomicfoundation/hardhat-toolbox");
/** @type import('hardhat/config').HardhatUserConfig */ /** @type import('hardhat/config').HardhatUserConfig */
module.exports = { module.exports = {
solidity: "0.8.20", solidity: "0.8.20",
mocha: {
timeout: 100000000,
}
}; };

View File

@ -9,9 +9,9 @@ describe("StakeManager contract", function () {
async function deployTokenFixture() { async function deployTokenFixture() {
const [owner, addr1, addr2, addr3] = await ethers.getSigners(); const [owner, addr1, addr2, addr3] = await ethers.getSigners();
const testToken = await ethers.deployContract("Token"); const testToken = await ethers.deployContract("Token");
await testToken.mint(addr1.address, 12 * 10^18); await Promise.all([ testToken.mint(addr1.address, 12 * 10^18),
await testToken.mint(addr2.address, 24 * 10^18); testToken.mint(addr2.address, 24 * 10^18),
await testToken.mint(addr3.address, 36 * 10^18); testToken.mint(addr3.address, 36 * 10^18)]);
return { testToken, owner, addr1, addr2, addr3 }; return { testToken, owner, addr1, addr2, addr3 };
} }
@ -25,5 +25,6 @@ describe("StakeManager contract", function () {
it("Deployment should be initialized zero", async function () { it("Deployment should be initialized zero", async function () {
const { stakeManager, testToken, owner } = await loadFixture(deployStakeManager); const { stakeManager, testToken, owner } = await loadFixture(deployStakeManager);
expect(await stakeManager.totalSupply()).to.equal(0); expect(await stakeManager.totalSupply()).to.equal(0);
expect(await stakeManager.totalSupply()).to.equal(0);
}); });
}); });