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

feat(frontend): add tests for networkAddress #4005

Merged
merged 4 commits into from
Dec 18, 2024

Conversation

loki344
Copy link
Collaborator

@loki344 loki344 commented Dec 17, 2024

Motivation

network.derived.ts derived networkAddress is currently misleading as it only takes into account icp and eth as a network. Implementing SOL as a further network I want to consolidate the logic spread in the different receive modal components to evaluate the current address for the network.

As a first step, we add unit tests to ensure the current functionality.

Changes

  • Add unit tests for networkAddress

@loki344 loki344 marked this pull request as ready for review December 17, 2024 15:22
@loki344 loki344 requested a review from a team as a code owner December 17, 2024 15:22
}
])('returns $network address when network is $network', ({ network, expectedAddress }) => {
mockPage.mock({ network });
ethAddressStore.set(mockEthAddressWithCertified);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's the same on each run, shall we move it to beforeEach?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@DenysKarmazynDFINITY DenysKarmazynDFINITY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comment, otherwise LGTM

@loki344 loki344 enabled auto-merge (squash) December 18, 2024 08:02
@loki344 loki344 merged commit 8165845 into main Dec 18, 2024
21 checks passed
@loki344 loki344 deleted the feat(frontend)/network-address-test branch December 18, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants