Skip to content

fix: onRefresh signature in lib test-utils omits required currentTokens parameter #257

@panz3r

Description

@panz3r

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions