feat: Font options for the UI in larger screens, for code and screen fonts display

This commit is contained in:
Ruhani Rabin
2026-03-04 11:08:31 +08:00
parent b7c18d5f3c
commit 090e39016f
9 changed files with 604 additions and 104 deletions

29
src/test/setup.ts Normal file
View File

@@ -0,0 +1,29 @@
/**
* Test environment polyfills for Vitest running in `node` mode.
* Provides a minimal localStorage implementation with clear() to satisfy hooks.
*/
if (typeof globalThis.localStorage === 'undefined' || typeof globalThis.localStorage.clear !== 'function') {
const store = new Map<string, string>();
globalThis.localStorage = {
getItem(key: string) {
return store.has(key) ? store.get(key)! : null;
},
setItem(key: string, value: string) {
store.set(String(key), String(value));
},
removeItem(key: string) {
store.delete(key);
},
clear() {
store.clear();
},
key(index: number) {
return Array.from(store.keys())[index] ?? null;
},
get length() {
return store.size;
},
} as unknown as Storage;
}