Merge branch 'renovate/all-minor-patch' into 'main'
[ProtonMail-WebClient.git] / packages / testing / lib / cache.ts
blobd2ca4c6e1cf6f166971993af9856c65f7eb7b9c9
1 import createCache from '@proton/shared/lib/helpers/cache';
2 import { STATUS } from '@proton/shared/lib/models/cache';
4 export interface ResolvedRequest<T> {
5     status: STATUS;
6     value: T;
9 export const resolvedRequest = <T>(value: T): ResolvedRequest<T> => ({ status: STATUS.RESOLVED, value });
11 export const mockCache = createCache();
13 export const clearCache = () => mockCache.clear();