Finalize test migration: remove legacy dependencies and test helpers (#4797)

This commit is contained in:
Hadrien Croubois
2023-12-26 23:46:06 +01:00
committed by GitHub
parent abcf9dd8b7
commit a72c9561b9
96 changed files with 951 additions and 6503 deletions

View File

@ -3,7 +3,7 @@ const { expect } = require('chai');
const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers');
const { min } = require('../helpers/math');
const { bigint: time } = require('../helpers/time');
const time = require('../helpers/time');
const { shouldBehaveLikeVesting } = require('./VestingWallet.behavior');
@ -39,7 +39,7 @@ async function fixture() {
},
token: {
checkRelease: async (tx, amount) => {
await expect(tx).to.emit(token, 'Transfer').withArgs(mock.target, beneficiary.address, amount);
await expect(tx).to.emit(token, 'Transfer').withArgs(mock, beneficiary, amount);
await expect(tx).to.changeTokenBalances(token, [mock, beneficiary], [-amount, amount]);
},
setupFailure: async () => {
@ -50,8 +50,8 @@ async function fixture() {
};
},
releasedEvent: 'ERC20Released',
argsVerify: [token.target],
args: [ethers.Typed.address(token.target)],
argsVerify: [token],
args: [ethers.Typed.address(token)],
},
};
@ -76,7 +76,7 @@ describe('VestingWallet', function () {
});
it('check vesting contract', async function () {
expect(await this.mock.owner()).to.be.equal(this.beneficiary.address);
expect(await this.mock.owner()).to.be.equal(this.beneficiary);
expect(await this.mock.start()).to.be.equal(this.start);
expect(await this.mock.duration()).to.be.equal(this.duration);
expect(await this.mock.end()).to.be.equal(this.start + this.duration);