[PR #5634] test: use toMatchObjectType instead of toMatchTypeOf #14376

Closed
opened 2026-04-13 09:26:41 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/better-auth/better-auth/pull/5634

State: closed
Merged: No


Summary by cubic

Updated type tests to use toMatchObjectType for clearer object-shape assertions and expanded additionalFields coverage, including $Infer.Session and plugin interop. No runtime changes.

  • Refactors
    • Replaced expectTypeOf(...).toMatchTypeOf with .toMatchObjectType in client and additional-fields tests.
    • Switched session type checks to client.$Infer.Session; adjusted expectations for nullable/optional fields (image, nonRequiredFiled).
    • Added tests to verify compatibility with twoFactorClient and jwtClient.
**Original Pull Request:** https://github.com/better-auth/better-auth/pull/5634 **State:** closed **Merged:** No --- <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Updated type tests to use toMatchObjectType for clearer object-shape assertions and expanded additionalFields coverage, including $Infer.Session and plugin interop. No runtime changes. - **Refactors** - Replaced expectTypeOf(...).toMatchTypeOf with .toMatchObjectType in client and additional-fields tests. - Switched session type checks to client.$Infer.Session; adjusted expectations for nullable/optional fields (image, nonRequiredFiled). - Added tests to verify compatibility with twoFactorClient and jwtClient. <!-- End of auto-generated description by cubic. -->
GiteaMirror added the pull-request label 2026-04-13 09:26:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#14376