Skip to content

Conversation

@mcous
Copy link
Owner

@mcous mcous commented Aug 10, 2025

This PR steals a convenient part of td.js' API that I haven't stolen yet:

// before
const mock = vi.fn()
when(mock).calledWith(1, 2).thenReturn(3)

// after
const mock = when(vi.fn()).calledWith(1, 2).thenReturn(3)

@mcous mcous marked this pull request as ready for review August 11, 2025 14:58
@mcous mcous force-pushed the feat/return-mock branch from b7e49ea to 27f97f1 Compare August 29, 2025 12:59
@mcous mcous force-pushed the feat/return-mock branch from 8994903 to 9446c5d Compare August 29, 2025 13:02
@mcous mcous merged commit 067fc34 into main Aug 29, 2025
21 checks passed
@mcous mcous deleted the feat/return-mock branch August 29, 2025 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants