-
-
Notifications
You must be signed in to change notification settings - Fork 0
234 #320
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
Merged
Merged
234 #320
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added complete test coverage for src/turnkey/domain.rs: - Added 17 unit tests for TurnkeyErrorKind and TurnkeyError - Added 10 doctests for all public types and methods - Added module-level documentation - Tested Display implementations for both enum and struct - Tested Clone, PartialEq, Eq traits - Tested TurnkeyError::new with various input types - Verified map_turnkey_kind mappings Test results: - Unit tests: 386 passed (was 367, +19) - Doctests: 10 for turnkey::domain module - Clippy: no warnings - Formatting: compliant with rustfmt Coverage: - TurnkeyErrorKind: 100% - TurnkeyError: 100% - map_turnkey_kind: 100%
Added complete test coverage for src/turnkey/conversions.rs: - Added 14 unit tests for From trait implementations - Added 3 doctests for both conversion methods - Added module-level documentation with examples - Tested all TurnkeyErrorKind to AppErrorKind conversions - Tested all TurnkeyError to AppError conversions - Verified message preservation (empty, unicode, long messages) - Verified correct error kind mapping for all variants Test results: - Unit tests: 45 turnkey tests passed (was 31, +14) - Doctests: 3 for turnkey::conversions module - Clippy: no warnings - Formatting: compliant with rustfmt Coverage: - From<TurnkeyErrorKind> for AppErrorKind: 100% - From<TurnkeyError> for AppError: 100%
Added complete test coverage for src/frontend/browser_console_ext.rs: - Added 9 unit tests for BrowserConsoleExt trait implementations - Added 2 doctests for public trait methods - Added module-level documentation with platform support info - Tested to_js_value on native targets (returns UnsupportedTarget) - Tested log_to_browser_console on native targets - Tested all error kinds with BrowserConsoleExt methods - Tested edge cases (empty messages, unicode messages) Test results: - Unit tests: 21 frontend tests passed (was 12, +9) - Doctests: 2 passed, 2 ignored (WASM-specific) - Clippy: no warnings - Formatting: compliant with rustfmt Coverage: - BrowserConsoleExt trait: 100% (native paths) - ErrorResponse impl: 100% (native paths) - AppError impl: 100% (native paths)
Added complete test coverage for src/frontend/browser_console_error.rs: - Added 7 unit tests for error variants - Added 9 doctests for enum and all variants - Added module-level documentation with error variant overview - Added Clone derive to BrowserConsoleError - Tested context method for all variants - Tested Display implementation - Tested edge cases (empty messages, unicode, special characters) - Tested PartialEq and Clone traits Test results: - Unit tests: 28 frontend tests passed (was 21, +7) - Doctests: 9 for browser_console_error module - Clippy: no warnings - Formatting: compliant with rustfmt Coverage: - BrowserConsoleError enum: 100% - context() method: 100%
# Conflicts: # src/turnkey/tests.rs
…e_error.rs - Test Clone trait for all variants - Test PartialEq with different variants and messages - Test Debug trait format - Test context() for unit variants returns None - Test context() for variants with messages - Coverage: 90% -> 98.28%
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Comprehensive test coverage for
src/frontend/browser_console_error.rsto achieve 95%+ coverage target.Coverage Improvement
Before: 90% lines
After: 98.28% lines
Delta: +8.28%
Tests Added
Clone trait tests
PartialEq tests
Debug trait tests
context() method tests
Test Coverage
Verification
cargo test --lib frontend::browser_console_error cargo llvm-cov --all-features --workspaceCloses #234