Vitest · Matcher
toHaveResolvedWith
toHaveResolvedWith checks that a spy function has successfully resolved a specified value at least once. It uses deep equality like toEqual and fails if the relevant promise is still pending.
Last updated
Syntax
toHaveResolvedWith(returnValue: any): Awaitable<void>In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
toHaveResolvedTimestoHaveLastResolvedWithtoHaveNthResolvedWithvi.fnexpect