Context
Related to PR #424 which demonstrates the pattern for modularisation by refactoring the connection module.
Request from: @leynos
Source: #424
Problem
Integration test helpers in tests/common/mod.rs:7 rely on file-level #![allow] attributes to suppress dead_code and allow_attributes warnings. This is necessary because Rust's per-test-crate compilation model means that helpers used by only some integration tests appear unused within each test crate.
Proposed Solution
Move these helpers into the wireframe_testing crate as part of the public API, then import them from integration tests. This approach:
- Eliminates the need for
#![allow(dead_code)] and #![allow(allow_attributes)] suppressions
- Makes the helpers available as a proper public API for testing
- Follows proper module boundaries and compilation unit structure
- Allows the helpers to be reused across different test crates without duplication
Benefits
- Cleaner code: Remove unnecessary lint allowances
- Better structure: Proper separation between production code and test utilities
- Reusability: Helpers become available for external users of the library
- Maintainability: Helpers are compiled once as part of the library, not per-test-crate
Implementation Notes
- Extract helpers from
tests/common/mod.rs into wireframe_testing crate
- Update integration tests to import from
wireframe_testing
- Remove the
#![allow] attributes from tests/common/mod.rs
- Ensure all integration tests continue to pass
Context
Related to PR #424 which demonstrates the pattern for modularisation by refactoring the connection module.
Request from: @leynos
Source: #424
Problem
Integration test helpers in
tests/common/mod.rs:7rely on file-level#![allow]attributes to suppressdead_codeandallow_attributeswarnings. This is necessary because Rust's per-test-crate compilation model means that helpers used by only some integration tests appear unused within each test crate.Proposed Solution
Move these helpers into the
wireframe_testingcrate as part of the public API, then import them from integration tests. This approach:#![allow(dead_code)]and#![allow(allow_attributes)]suppressionsBenefits
Implementation Notes
tests/common/mod.rsintowireframe_testingcratewireframe_testing#![allow]attributes fromtests/common/mod.rs