Spaces:
Running
Running
Download frontend/src/test/setup.js from Falln87/OmniVoice-Studio: direct link, hf CLI and curl.
- Browser
- Download file 424 Bytes
-
https://huggingface.co/spaces/Falln87/OmniVoice-Studio/resolve/main/frontend/src/test/setup.js
- Command line
-
hf download hf://spaces/Falln87/OmniVoice-Studio/frontend/src/test/setup.js
-
curl -L -o setup.js https://huggingface.co/spaces/Falln87/OmniVoice-Studio/resolve/main/frontend/src/test/setup.js
424 Bytes
| import '@testing-library/jest-dom/vitest'; | |
| const localStorageMock = (function () { | |
| let store = {}; | |
| return { | |
| getItem(key) { | |
| return store[key] || null; | |
| }, | |
| setItem(key, value) { | |
| store[key] = value.toString(); | |
| }, | |
| clear() { | |
| store = {}; | |
| }, | |
| removeItem(key) { | |
| delete store[key]; | |
| } | |
| }; | |
| })(); | |
| Object.defineProperty(window, 'localStorage', { | |
| value: localStorageMock | |
| }); | |