()
| 15 | const OTHER_ORG = "org_other"; |
| 16 | |
| 17 | const memoryStorage = (): SnoozeStorage & { readonly items: Map<string, string> } => { |
| 18 | const items = new Map<string, string>(); |
| 19 | return { |
| 20 | items, |
| 21 | getItem: (key) => items.get(key) ?? null, |
| 22 | setItem: (key, value) => void items.set(key, value), |
| 23 | }; |
| 24 | }; |
| 25 | |
| 26 | /** Storage that throws on every access, like a disabled localStorage. */ |
| 27 | const throwingStorage: SnoozeStorage = { |
no test coverage detected