()
| 6 | const STORAGE_KEY = "tabularis_row_editor_sidebar_width"; |
| 7 | |
| 8 | const createLocalStorageStub = () => { |
| 9 | const store = new Map<string, string>(); |
| 10 | return { |
| 11 | getItem: (k: string) => (store.has(k) ? store.get(k)! : null), |
| 12 | setItem: (k: string, v: string) => { |
| 13 | store.set(k, String(v)); |
| 14 | }, |
| 15 | removeItem: (k: string) => { |
| 16 | store.delete(k); |
| 17 | }, |
| 18 | clear: () => store.clear(), |
| 19 | key: (i: number) => Array.from(store.keys())[i] ?? null, |
| 20 | get length() { |
| 21 | return store.size; |
| 22 | }, |
| 23 | }; |
| 24 | }; |
| 25 | |
| 26 | describe("useRowEditorResize", () => { |
| 27 | beforeEach(() => { |
no outgoing calls
no test coverage detected