Skip to content

Commit

Permalink
update pp invalid-nonexist fail test
Browse files Browse the repository at this point in the history
  • Loading branch information
canonbrother committed Oct 3, 2024
1 parent 99cf850 commit 8756acf
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -994,12 +994,16 @@ describe('get list swappable tokens', () => {
})

it('should throw error for invalid / non-existent tokenId', async () => {
await expect(controller.listSwappableTokens('-1')).rejects.toThrowError('404 - NotFound (/v0/regtest/poolpairs/paths/swappable/-1): Unable to find token -1')
// rust-ocean
// skip as `-1` failed throw path validation which is not u32, hit ParseIntErr
// await expect(controller.listSwappableTokens('-1')).rejects.toThrowError('404 - NotFound (/v0/regtest/poolpairs/paths/swappable/-1): Unable to find token -1')
// await expect(controller.listSwappableTokens('a')).rejects.toThrowError('404 - NotFound (/v0/regtest/poolpairs/paths/swappable/a): Unable to find token a')
await expect(controller.listSwappableTokens('100')).rejects.toThrowError('404 - NotFound (/v0/regtest/poolpairs/paths/swappable/100): Unable to find token 100')
await expect(controller.listSwappableTokens('a')).rejects.toThrowError('404 - NotFound (/v0/regtest/poolpairs/paths/swappable/a): Unable to find token a')

// js-ocean
// await expect(controller.listSwappableTokens('-1')).rejects.toThrowError('Unable to find token -1')
// await expect(controller.listSwappableTokens('100')).rejects.toThrowError('Unable to find token 100')
// await expect(controller.listSwappableTokens('a')).rejects.toThrowError('Unable to find token a')
// await expect(controller.listSwappableTokens('100')).rejects.toThrowError('Unable to find token 100')
})
})

Expand Down

0 comments on commit 8756acf

Please sign in to comment.