mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
cleanup tests
This commit is contained in:
parent
095e539542
commit
52423b91d5
1 changed files with 0 additions and 20 deletions
|
|
@ -1,20 +0,0 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import hre from "hardhat";
|
|
||||||
import { time } from "@nomicfoundation/hardhat-toolbox/network-helpers";
|
|
||||||
|
|
||||||
describe("Lock", function () {
|
|
||||||
it("Should set the right unlockTime", async function () {
|
|
||||||
const lockedAmount = 1_000_000_000;
|
|
||||||
const ONE_YEAR_IN_SECS = 365 * 24 * 60 * 60;
|
|
||||||
const unlockTime = (await time.latest()) + ONE_YEAR_IN_SECS;
|
|
||||||
|
|
||||||
// deploy a lock contract where funds can be withdrawn
|
|
||||||
// one year in the future
|
|
||||||
const lock = await hre.ethers.deployContract("Lock", [unlockTime], {
|
|
||||||
value: lockedAmount,
|
|
||||||
});
|
|
||||||
|
|
||||||
// assert that the value is correct
|
|
||||||
expect(await lock.unlockTime()).to.equal(unlockTime);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
Loading…
Reference in a new issue