Skip to content

Commit

Permalink
Add an API test for case insensitivity
Browse files Browse the repository at this point in the history
  • Loading branch information
popzxc committed Feb 22, 2022
1 parent 3b9e2c3 commit 7126996
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/tests/ts-tests/tests/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,13 @@ describe('ZkSync REST API V0.2 tests', () => {
const secondToken = await provider.tokenInfo(1);
expect(tokens.list[0]).to.be.eql(firstToken);
expect(tokens.list[1]).to.be.eql(secondToken);

// Case insensitivity check.
const ethToken1 = await provider.tokenInfo('ETH');
const ethToken2 = await provider.tokenInfo('eth');
expect(tokens.list[0]).to.be.eql(ethToken1);
expect(tokens.list[0]).to.be.eql(ethToken2);

const firstTokenUSDPrice = await provider.getTokenPrice(0);
const secondTokenUSDPrice = await provider.getTokenPrice(1);
const expectedPrice = firstTokenUSDPrice / secondTokenUSDPrice;
Expand Down

0 comments on commit 7126996

Please sign in to comment.