You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DashWalletTests cannot build, so new unit tests document intent instead of guarding it #1127
DashWalletTests cannot be compiled as a target. Its files are split across two app modules:
import
files
@testable import dashwallet
7
@testable import dashpay
26
No scheme builds both modules, so the target never type-checks as a whole. Every test in it is unverified — not merely unrun, but never compiled.
Raised during review of #1118, where two policy types (RuntimeRefreshPolicy, RuntimeReadinessPolicy) were extracted specifically so the refresh-elision and readiness decisions could be regression-tested. The tests exist and read correctly, but nothing compiles them, so they document intent rather than guard it. The userHasBalance contract change in that PR sits in the dashwallet-importing minority and is in the same position.
Why the obvious shortcut does not work as-is
The suggestion in review was a small separate test target compiling only those two value types plus their tests. That is not a drop-in today:
RuntimeRefreshPolicy.shouldSkipRebuild takes SwiftDashSDKWalletRuntime.RefreshTrigger, an enum nested inside the runtime class. Compiling the policy therefore pulls in the whole ~900-line runtime file and everything it touches: the host, the Platform sync coordinator, the lifecycle transition state.
RuntimeReadinessPolicy takes Network, which comes from SwiftDashSDK. Even a minimal target needs the SDK package.
So "dependency-free value types" is not quite the state of the code.
Options
Split the test target in two, one per app module, matching the split that already exists in the files. Largest change, fixes every test at once.
Lift RefreshTrigger out of the runtime class to a top-level enum, then a small target can compile both policies plus their tests against SwiftDashSDK alone. Narrow, and makes the extracted policies genuinely testable, which was the point of extracting them.
Leave as is and stop adding tests to the target, so nobody mistakes them for coverage.
Option 2 is the cheapest thing that turns the existing policy tests into real coverage.
Scope note
Pre-existing and not introduced by #1118. That PR states the situation plainly in its description rather than implying the tests run.
Resolved by #1213 (revived DashWalletTests against the dashwallet-dashpay scheme; the real blocker was the Release TestAction without ENABLE_TESTABILITY, not the mixed imports) and #1217 (ported the harness-only tests back into the target). The suite runs on every PR via .github/workflows/unit-tests.yml, so the policy tests from #1118 are compiled and executed, not just documented.
Activity
fix(wallet): drop a receive address read for a wallet that is no long…
llbartekll commentedon Oct 23, 2026
Resolved by #1213 (revived
DashWalletTestsagainst thedashwallet-dashpayscheme; the real blocker was the Release TestAction withoutENABLE_TESTABILITY, not the mixed imports) and #1217 (ported the harness-only tests back into the target). The suite runs on every PR via.github/workflows/unit-tests.yml, so the policy tests from #1118 are compiled and executed, not just documented.