Skip to content

Commit

Permalink
test: ensure test tokens are isolated from masterchef test
Browse files Browse the repository at this point in the history
  • Loading branch information
diegofigs committed Feb 19, 2025
1 parent f41518b commit 65952d7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions contracts/mocks/TestTokenMock.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract TestTokenMock is ERC20 {
constructor(string memory name, string memory symbol, uint8 decimals, uint256 supply) public ERC20(name, symbol) {

Check failure on line 8 in contracts/mocks/TestTokenMock.sol

View workflow job for this annotation

GitHub Actions / lint

Replace string·memory·name,·string·memory·symbol,·uint8·decimals,·uint256·supply with ⏎········string·memory·name,⏎········string·memory·symbol,⏎········uint8·decimals,⏎········uint256·supply⏎····
_setupDecimals(decimals);
_mint(msg.sender, supply);
}

function burn(address account, uint256 amount) public virtual {
_burn(account, amount);
}
}
4 changes: 2 additions & 2 deletions test/governance/FeeCollector.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Contract } from "ethers";
import { ethers } from "hardhat";
import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers";

describe.skip("FeeCollector", function () {
describe("FeeCollector", function () {
let feeCollector: Contract;
let erc20Mock: Contract;
let owner: SignerWithAddress;
Expand All @@ -17,7 +17,7 @@ describe.skip("FeeCollector", function () {
[owner, feeManager1, feeManager2, feeManager3, nonFeeManager] = await ethers.getSigners();

// Deploy ERC20Mock for testing.
const ERC20MockFactory = await ethers.getContractFactory("ERC20Mock");
const ERC20MockFactory = await ethers.getContractFactory("TestTokenMock");
const decimals = ethers.BigNumber.from("1000000000000000000");
const supply = ethers.BigNumber.from("1000000000").mul(decimals);
erc20Mock = await ERC20MockFactory.deploy("TestToken", "TT", 18, supply);
Expand Down

0 comments on commit 65952d7

Please sign in to comment.