( cacheKey: string, resolve: (result: T | null) => void = vi.fn() )
| 9 | } from './asyncImageCacheState'; |
| 10 | |
| 11 | function createPending<T>( |
| 12 | cacheKey: string, |
| 13 | resolve: (result: T | null) => void = vi.fn() |
| 14 | ): AsyncImageCachePendingItem<T> { |
| 15 | return { |
| 16 | bitmap: buildImageBitmap({ close: vi.fn() }), |
| 17 | cacheKey, |
| 18 | resolve, |
| 19 | }; |
| 20 | } |
| 21 | |
| 22 | describe('async image cache state helpers', () => { |
| 23 | it('creates empty cache state with default lifecycle flags', () => { |
no test coverage detected