| name | dependabit-test-utils |
| description | Documentation site for dependabit |
@dependabit/test-utils
Documentation site for dependabit
Quick Reference
Test Utilities: createMockFn (Creates a Vitest mock function), spyOn (Creates a Vitest spy on an object method), createMockTimer (Activates Vitest fake timers and returns a helper object), mockFetch (Replaces the global fetch with a Vitest mock that returns response
as JSON when url is requested), createMockUser (Creates generic mock user data for testing), createMockEmail (Creates generic mock email data for testing), createMockApiResponse (Creates a generic mock API response envelope for testing), createMockErrorResponse (Creates a generic mock error response envelope for testing), createMockArray (Creates an array of mock items using a factory function)
References
Load these on demand — do NOT read all at once:
- When calling any function → read
references/functions.md for full signatures, parameters, and return types
Links