(envValues: Record<string, string | undefined> = defaultMockEnv)
| 25 | * Creates a mock getEnv function that returns values from the provided env object |
| 26 | */ |
| 27 | export function createMockGetEnv(envValues: Record<string, string | undefined> = defaultMockEnv) { |
| 28 | return vi.fn((key: string) => envValues[key]) |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Creates a complete env mock object for use with vi.doMock |