(value: unknown, needle: string)
| 11 | const mockLoggerDebug = vi.hoisted(() => vi.fn()); |
| 12 | |
| 13 | function containsString(value: unknown, needle: string): boolean { |
| 14 | if (typeof value === 'string') { |
| 15 | return value.includes(needle); |
| 16 | } |
| 17 | if (Array.isArray(value)) { |
| 18 | return value.some((item) => containsString(item, needle)); |
| 19 | } |
| 20 | if (value && typeof value === 'object') { |
| 21 | return Object.values(value).some((item) => containsString(item, needle)); |
| 22 | } |
| 23 | return false; |
| 24 | } |
| 25 | |
| 26 | vi.mock('../src/cache', () => ({ |
| 27 | fetchWithCache: vi.fn(), |
no test coverage detected
searching dependent graphs…