Skip to content

Commit

Permalink
test: fix .only in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tamtamchik committed Dec 17, 2024
1 parent ce7ccb8 commit 496e6f2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
10 changes: 7 additions & 3 deletions test/0.8.25/vaults/dashboard/dashboard.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers";
import { expect } from "chai";
import { randomBytes } from "crypto";
import { ZeroAddress } from "ethers";
import { ethers } from "hardhat";
import { certainAddress, ether, findEvents } from "lib";
import { Snapshot } from "test/suite";

import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers";

import {
Dashboard,
DepositContract__MockForStakingVault,
Expand All @@ -14,6 +14,10 @@ import {
VaultHub__MockForDashboard,
} from "typechain-types";

import { certainAddress, ether, findEvents } from "lib";

import { Snapshot } from "test/suite";

describe("Dashboard", () => {
let factoryOwner: HardhatEthersSigner;
let vaultOwner: HardhatEthersSigner;
Expand Down
18 changes: 9 additions & 9 deletions test/0.8.25/vaults/delegation/delegation.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers";
import { expect } from "chai";
import { keccak256 } from "ethers";
import { ethers } from "hardhat";
import { advanceChainTime, days, ether, findEvents, getNextBlockTimestamp, impersonate, streccak } from "lib";
import { Snapshot } from "test/suite";

import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers";

import {
Delegation,
DepositContract__MockForStakingVault,
Expand All @@ -13,17 +13,17 @@ import {
VaultHub__MockForDelegation,
} from "typechain-types";

import { advanceChainTime, days, ether, findEvents, getNextBlockTimestamp, impersonate } from "lib";

import { Snapshot } from "test/suite";

const BP_BASE = 10000n;
const MAX_FEE = BP_BASE;

describe("Delegation", () => {
let deployer: HardhatEthersSigner;
let vaultOwner: HardhatEthersSigner;
let manager: HardhatEthersSigner;
let operator: HardhatEthersSigner;
let staker: HardhatEthersSigner;
let keyMaster: HardhatEthersSigner;
let tokenMaster: HardhatEthersSigner;
let stranger: HardhatEthersSigner;
let factoryOwner: HardhatEthersSigner;
let hubSigner: HardhatEthersSigner;
Expand All @@ -40,8 +40,7 @@ describe("Delegation", () => {
let originalState: string;

before(async () => {
[deployer, vaultOwner, manager, staker, operator, keyMaster, tokenMaster, stranger, factoryOwner] =
await ethers.getSigners();
[, vaultOwner, manager, operator, stranger, factoryOwner] = await ethers.getSigners();

steth = await ethers.deployContract("StETH__MockForDelegation");
delegationImpl = await ethers.deployContract("Delegation", [steth]);
Expand All @@ -63,6 +62,7 @@ describe("Delegation", () => {
const vaultCreationTx = await factory
.connect(vaultOwner)
.createVault({ managementFee: 0n, performanceFee: 0n, manager, operator }, "0x");

const vaultCreationReceipt = await vaultCreationTx.wait();
if (!vaultCreationReceipt) throw new Error("Vault creation receipt not found");

Expand Down
4 changes: 2 additions & 2 deletions test/0.8.25/vaults/staking-vault/staking-vault.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ZeroAddress } from "ethers";
import { ethers } from "hardhat";

import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers";
import { getStorageAt, setBalance } from "@nomicfoundation/hardhat-network-helpers";
import { setBalance } from "@nomicfoundation/hardhat-network-helpers";

import {
DepositContract__MockForStakingVault,
Expand All @@ -23,7 +23,7 @@ const MAX_INT128 = 2n ** 127n - 1n;
const MAX_UINT128 = 2n ** 128n - 1n;

// @TODO: test reentrancy attacks
describe.only("StakingVault", () => {
describe("StakingVault", () => {
let vaultOwner: HardhatEthersSigner;
let operator: HardhatEthersSigner;
let stranger: HardhatEthersSigner;
Expand Down

0 comments on commit 496e6f2

Please sign in to comment.