cleanup tests

This commit is contained in:
Dimitar Manov 2025-06-11 13:36:30 +03:00
parent 095e539542
commit 52423b91d5

View file

@ -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);
});
});