first commit

This commit is contained in:
Awuqing
2026-03-17 13:29:09 +08:00
commit eadd3f8961
219 changed files with 22394 additions and 0 deletions

26
web/src/test/setup.ts Normal file
View File

@@ -0,0 +1,26 @@
import '@testing-library/jest-dom/vitest'
const storage = (() => {
const store = new Map<string, string>()
return {
getItem: (key: string) => store.get(key) ?? null,
setItem: (key: string, value: string) => {
store.set(key, value)
},
removeItem: (key: string) => {
store.delete(key)
},
clear: () => {
store.clear()
},
key: (index: number) => Array.from(store.keys())[index] ?? null,
get length() {
return store.size
},
}
})()
Object.defineProperty(window, 'localStorage', {
value: storage,
configurable: true,
})