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

Tests for hooks (1) #177

Merged
merged 20 commits into from
Feb 18, 2025
Merged

Tests for hooks (1) #177

merged 20 commits into from
Feb 18, 2025

Conversation

w1that
Copy link
Contributor

@w1that w1that commented Feb 17, 2025

I will be writing tests for other hooks on a separate PR in order to make PRs reviewable.

@w1that w1that requested review from 0xsequence-bot and a team as code owners February 17, 2025 13:48
@w1that w1that marked this pull request as draft February 17, 2025 14:15
Add comprehensive test suite for transaction cancellation workflow and wallet mocking utilities.

Key Changes:
- Create reusable wallet mock factory with configurable behaviors
- Implement common wallet mock scenarios (chain switching, transactions, signatures)
- Add extensive test coverage for useCancelTransactionSteps hook
  - Chain switching scenarios and rejection handling
  - Error cases: wallet initialization, missing steps
  - Transaction failure scenarios
  - State management verification

Testing Coverage:
- Transaction execution flow
- Signature verification
- Chain switching logic
- Error handling scenarios
- State management
- Callback execution
@w1that w1that marked this pull request as ready for review February 18, 2025 12:40
@w1that w1that self-assigned this Feb 18, 2025
@w1that w1that changed the title WIP - Tests for hooks Tests for hooks (1) Feb 18, 2025
Copy link
Member

@AlexanderKolberg AlexanderKolberg left a comment

Choose a reason for hiding this comment

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

LGTM

@w1that w1that merged commit e24ec6d into master Feb 18, 2025
1 check failed
@w1that w1that deleted the tests-for-hooks branch February 18, 2025 12:46
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