OffchainLabs / arbitrum-token-bridge

💙 Interface for bridging assets to and from Arbitrum chains
https://bridge.arbitrum.io
Other
155 stars 199 forks source link

mock APIs in unit tests; move tests calling APIs to integration tests #702

Open fionnachan opened 1 year ago

fionnachan commented 1 year ago

IMO Unit test should either use mocked backend, or moved to integration tests, but it's outside of the scope of this PR

_Originally posted by @chrstph-dvx in https://github.com/OffchainLabs/arbitrum-token-bridge/pull/690#discussion_r1169923766_

chrstph-dvx commented 1 year ago

Adding context from @dewanshparashar:

APIs can be unit tested as well. E2E test doesn't make sense here because there is no UI flow around these tests' (fetch*FromSubgraph) exhaustive input. But an issue has been created for more exploration and discussion to refactor the tests well so that UI and backend are more independent of each other.