Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(test): making tests type-safe #318

Merged
merged 26 commits into from
Dec 7, 2022
Merged

fix(test): making tests type-safe #318

merged 26 commits into from
Dec 7, 2022

Conversation

RogerLamTd
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Nov 22, 2022

Codecov Report

Merging #318 (371aee3) into main (608e3e3) will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #318      +/-   ##
==========================================
+ Coverage   64.08%   64.10%   +0.01%     
==========================================
  Files          89       90       +1     
  Lines        2492     2524      +32     
  Branches      292      292              
==========================================
+ Hits         1597     1618      +21     
- Misses        828      834       +6     
- Partials       67       72       +5     
Flag Coverage Δ *Carryforward flag
bridge-ui 100.00% <ø> (ø) Carriedforward from c855569
protocol 58.64% <ø> (-0.37%) ⬇️
relayer 68.73% <ø> (+0.38%) ⬆️ Carriedforward from c855569
ui 100.00% <ø> (ø) Carriedforward from c855569

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
...rotocol/contracts/bridge/libs/LibBridgeProcess.sol 17.64% <ø> (-5.89%) ⬇️
...protocol/contracts/bridge/libs/LibBridgeSignal.sol 69.56% <0.00%> (-17.40%) ⬇️
packages/relayer/http/server.go 93.15% <0.00%> (-2.74%) ⬇️
packages/relayer/indexer/filter_then_subscribe.go 20.00% <0.00%> (-0.26%) ⬇️
packages/relayer/cli/cli.go 61.01% <0.00%> (-0.17%) ⬇️
packages/relayer/indexer/handle_event.go 50.00% <0.00%> (ø)
...ages/relayer/indexer/handle_no_events_remaining.go 64.70% <0.00%> (ø)
packages/relayer/indexer/subscribe.go 86.48% <0.00%> (+3.72%) ⬆️
packages/relayer/indexer/service.go 79.31% <0.00%> (+4.31%) ⬆️
... and 3 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@RogerLamTd
Copy link
Contributor Author

isMessageSent, isSignalReceived and isMessageReceived tests are done, waiting on @cyberhorsey to unblock retryMessage. Converted a bunch of tests to use type-chain for type safety. Please review! @dantaik @davidtaikocha

@cyberhorsey
Copy link
Contributor

We can do retryMessage in separate PR, to get this large opened one in when it is ready.

packages/protocol/contracts/libs/LibConstants.sol Outdated Show resolved Hide resolved
packages/protocol/test/bridge/Bridge.test.ts Outdated Show resolved Hide resolved
packages/protocol/test/bridge/Bridge.test.ts Outdated Show resolved Hide resolved
@RogerLamTd
Copy link
Contributor Author

@cyberhorsey implemented suggested changes, also made the signalProof generation into a util function (similarly repeatable)

dantaik
dantaik previously approved these changes Dec 7, 2022
@dantaik dantaik merged commit 66ec7cc into main Dec 7, 2022
@dantaik dantaik deleted the testcleanup branch December 7, 2022 15:13
@github-actions github-actions bot mentioned this pull request Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[tests] Update bridge related tests to be type-safe and clean them up
4 participants