Repository navigation
IOTA Watch: contract tests that distinguish missing mining data from zero #11514
molimao
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I maintain IOTA Watch, an independent, open-source dashboard. Our Vitest suite is built around data meaning, because a monitor can pass a happy-path render test and still mislead users when an upstream API is partial.
The adapter cases cover a successful zero versus an absent reward, mismatched provider identifiers, a wallet-wide amount versus machine income, and rolling-24-hour rewards versus a calendar day. Mock fetchers also check fixed request origins, authorization headers, redirect handling, response-size limits and safe error output.
We separately test that encrypted credentials are bound to the user and project, that disconnect invalidates the user's cache, and that failed replacement credentials do not destroy a working saved connection. Database tests run actual migrations in PGlite with synthetic users and roles.
Platform adapter tests · connection tests · earnings tests
The io.net and Vast.ai integrations currently have mocked contract verification; we do not present that as a successful real-account payment/rewards test. Sharing this as the maintainer for feedback on useful failure-case coverage.
All reactions