Skip to content

Commit

Permalink
test: drop deprecated unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
rackstar committed Nov 4, 2024
1 parent 392b4e2 commit 62aec15
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 30 deletions.
10 changes: 0 additions & 10 deletions test/unit/PriceFeedOracle/getAssetForEth.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@ const { ETH } = require('../utils').constants.Assets;
const { parseEther, parseUnits } = ethers.utils;

describe('getAssetForEth', function () {
it('reverts if the asset is unknown', async function () {
const fixture = await loadFixture(setup);
const { priceFeedOracle } = fixture;
const ERC20Mock = await ethers.getContractFactory('ERC20Mock');
const newToken = await ERC20Mock.deploy();
await expect(priceFeedOracle.getAssetForEth(newToken.address, 1234)).to.be.revertedWith(
'PriceFeedOracle: Unknown asset',
);
});

it('returns ethIn if asset is ETH', async function () {
const fixture = await loadFixture(setup);
const { priceFeedOracle } = fixture;
Expand Down
10 changes: 0 additions & 10 deletions test/unit/PriceFeedOracle/getAssetToEthRate.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@ const { ETH } = require('../utils').constants.Assets;
const { parseEther, parseUnits } = ethers.utils;

describe('getAssetToEthRate', function () {
it('reverts if the asset is unknown', async function () {
const fixture = await loadFixture(setup);
const { priceFeedOracle } = fixture;
const ERC20Mock = await ethers.getContractFactory('ERC20Mock');
const newToken = await ERC20Mock.deploy();
await expect(priceFeedOracle.getAssetToEthRate(newToken.address)).to.be.revertedWith(
'PriceFeedOracle: Unknown asset',
);
});

it('returns 1 ether if asset is ETH', async function () {
const fixture = await loadFixture(setup);
const { priceFeedOracle } = fixture;
Expand Down
10 changes: 0 additions & 10 deletions test/unit/PriceFeedOracle/getEthForAsset.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@ const { ETH } = require('../utils').constants.Assets;
const { parseEther, parseUnits } = ethers.utils;

describe('getEthForAsset', function () {
it('reverts if the asset is unknown', async function () {
const fixture = await loadFixture(setup);
const { priceFeedOracle } = fixture;
const ERC20Mock = await ethers.getContractFactory('ERC20Mock');
const newToken = await ERC20Mock.deploy();
await expect(priceFeedOracle.getEthForAsset(newToken.address, 1234)).to.be.revertedWith(
'PriceFeedOracle: Unknown asset',
);
});

it('returns asset amount if asset is ETH', async function () {
const fixture = await loadFixture(setup);
const { priceFeedOracle } = fixture;
Expand Down

0 comments on commit 62aec15

Please sign in to comment.