Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeNervoXS committed Apr 19, 2024
1 parent a27ce09 commit 1b78773
Show file tree
Hide file tree
Showing 8 changed files with 367 additions and 211 deletions.
138 changes: 56 additions & 82 deletions src/dex/angle-staked-stable/angle-staked-stable-e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,89 +82,63 @@ function testForNetwork(
}

describe('AngleStakedStable E2E', () => {
// same addresses accross all chains
const tokens = Tokens[Network.MAINNET];
const dexKey = 'AngleStakedStable';

describe('Mainnet', () => {
const network = Network.MAINNET;

const tokenASymbol: string = 'EURA';
const tokenBSymbol: string = 'stEUR';

const tokenAAmount: string = '1000000000000000000';
const tokenBAmount: string = '1000000000000000000';
const nativeTokenAmount = '1000000000000000000';

testForNetwork(
network,
dexKey,
tokenASymbol,
tokenBSymbol,
tokenAAmount,
tokenBAmount,
nativeTokenAmount,
);
});

describe('Arbitrum', () => {
const network = Network.ARBITRUM;

const tokenASymbol: string = 'EURA';
const tokenBSymbol: string = 'stEUR';

const tokenAAmount: string = '1000000000000000000';
const tokenBAmount: string = '1000000000000000000';
const nativeTokenAmount = '1000000000000000000';

testForNetwork(
network,
dexKey,
tokenASymbol,
tokenBSymbol,
tokenAAmount,
tokenBAmount,
nativeTokenAmount,
);
});

describe('Polygon', () => {
const network = Network.POLYGON;

const tokenASymbol: string = 'EURA';
const tokenBSymbol: string = 'stEUR';

const tokenAAmount: string = '1000000000000000000';
const tokenBAmount: string = '1000000000000000000';
const nativeTokenAmount = '1000000000000000000';

testForNetwork(
network,
dexKey,
tokenASymbol,
tokenBSymbol,
tokenAAmount,
tokenBAmount,
nativeTokenAmount,
);
});

describe('Optimism', () => {
const network = Network.OPTIMISM;

const tokenASymbol: string = 'EURA';
const tokenBSymbol: string = 'stEUR';

const tokenAAmount: string = '1000000000000000000';
const tokenBAmount: string = '1000000000000000000';
const nativeTokenAmount = '1000000000000000000';
const networksEUR = [
Network.MAINNET,
Network.ARBITRUM,
Network.POLYGON,
Network.OPTIMISM,
];

const networksUSD = [
Network.MAINNET,
Network.ARBITRUM,
Network.POLYGON,
Network.OPTIMISM,
Network.BASE,
Network.BSC,
];

// biome-ignore lint/complexity/noForEach: <explanation>
networksEUR.forEach(network =>
describe(`${network} - EUR`, () => {
const tokenASymbol: string = 'EURA';
const tokenBSymbol: string = 'stEUR';
const tokenAAmount: string = '990000000000000000';
const tokenBAmount: string = '990000000000000000';
const nativeTokenAmount = '990000000000000000';
testForNetwork(
network,
dexKey,
tokenASymbol,
tokenBSymbol,
tokenAAmount,
tokenBAmount,
nativeTokenAmount,
);
}),
);

testForNetwork(
network,
dexKey,
tokenASymbol,
tokenBSymbol,
tokenAAmount,
tokenBAmount,
nativeTokenAmount,
);
});
// biome-ignore lint/complexity/noForEach: <explanation>
networksUSD.forEach(network =>
describe(`${network} - USD`, () => {
const tokenASymbol: string = 'USDA';
const tokenBSymbol: string = 'stUSD';
const tokenAAmount: string = '990000000000000000';
const tokenBAmount: string = '990000000000000000';
const nativeTokenAmount = '990000000000000000';
testForNetwork(
network,
dexKey,
tokenASymbol,
tokenBSymbol,
tokenAAmount,
tokenBAmount,
nativeTokenAmount,
);
}),
);
});
Loading

0 comments on commit 1b78773

Please sign in to comment.