()
| 41 | protected afterEach() { } |
| 42 | |
| 43 | private resetFrontEndStorage() { |
| 44 | let mockStorageRef = {}; |
| 45 | let mockStorageCacheRef = {}; |
| 46 | |
| 47 | Clipper.getStoredValue = (key: string, callback: (value: string) => void, cacheValue?: boolean) => { |
| 48 | if (cacheValue) { |
| 49 | mockStorageCacheRef[key] = mockStorageRef[key]; |
| 50 | } |
| 51 | callback(mockStorageRef[key]); |
| 52 | }; |
| 53 | Clipper.storeValue = (key: string, value: string) => { |
| 54 | if (key in mockStorageCacheRef) { |
| 55 | mockStorageCacheRef[key] = value; |
| 56 | } |
| 57 | mockStorageRef[key] = value; |
| 58 | }; |
| 59 | Clipper.preCacheStoredValues = (storageKeys: string[]) => { |
| 60 | for (let key of storageKeys) { |
| 61 | Clipper.getStoredValue(key, () => { }, true); |
| 62 | } |
| 63 | }; |
| 64 | Clipper.getCachedValue = (key: string) => { |
| 65 | return mockStorageCacheRef[key]; |
| 66 | }; |
| 67 | } |
| 68 | } |
no test coverage detected