Context
Discovered during development of the showcase example (PR #252).
Problem
The MockAuthClient in lib/test/test-utils.tsx declares onRefresh as:
onRefresh(_minValidity?: number) { ... }
But the actual AuthClient interface requires currentTokens as the first parameter:
onRefresh(currentTokens: T, minValidity?: number): Promise<T>
This means the mock implementation silently omits the required first argument, which misleads anyone reading the test utilities to learn the API contract for onRefresh.
Impact
- New contributors studying the tests to understand the
AuthClient interface will learn the wrong signature for onRefresh.
- Any test relying on
currentTokens passed to onRefresh would silently receive undefined instead.
Proposed Action
Update onRefresh in lib/test/test-utils.tsx to match the correct interface signature, including the currentTokens parameter.