diff options
| author | Adam Mathes <adam@adammathes.com> | 2026-02-14 08:58:38 -0800 |
|---|---|---|
| committer | Adam Mathes <adam@adammathes.com> | 2026-02-14 08:58:38 -0800 |
| commit | e3c379d069ffa9661561d25cdbf2f5894a2f8ee8 (patch) | |
| tree | 24d0e9f5610dd9c8f873c5b78e6bc1c88d32840a /frontend/src/setupTests.ts | |
| parent | 4b06155fbde91a1bef6361ef36efb28789861928 (diff) | |
| download | neko-e3c379d069ffa9661561d25cdbf2f5894a2f8ee8.tar.gz neko-e3c379d069ffa9661561d25cdbf2f5894a2f8ee8.tar.bz2 neko-e3c379d069ffa9661561d25cdbf2f5894a2f8ee8.zip | |
Refactor: project structure, implement dependency injection, and align v2 UI with v1
Diffstat (limited to 'frontend/src/setupTests.ts')
| -rw-r--r-- | frontend/src/setupTests.ts | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/frontend/src/setupTests.ts b/frontend/src/setupTests.ts index 052d18e..5781184 100644 --- a/frontend/src/setupTests.ts +++ b/frontend/src/setupTests.ts @@ -2,39 +2,39 @@ import '@testing-library/jest-dom'; // Mock IntersectionObserver class IntersectionObserver { - readonly root: Element | null = null; - readonly rootMargin: string = ''; - readonly thresholds: ReadonlyArray<number> = []; + readonly root: Element | null = null; + readonly rootMargin: string = ''; + readonly thresholds: ReadonlyArray<number> = []; - constructor(_callback: IntersectionObserverCallback, _options?: IntersectionObserverInit) { - // nothing - } + constructor(_callback: IntersectionObserverCallback, _options?: IntersectionObserverInit) { + // nothing + } - observe(_target: Element): void { - // nothing - } + observe(_target: Element): void { + // nothing + } - unobserve(_target: Element): void { - // nothing - } + unobserve(_target: Element): void { + // nothing + } - disconnect(): void { - // nothing - } + disconnect(): void { + // nothing + } - takeRecords(): IntersectionObserverEntry[] { - return []; - } + takeRecords(): IntersectionObserverEntry[] { + return []; + } } Object.defineProperty(window, 'IntersectionObserver', { - writable: true, - configurable: true, - value: IntersectionObserver, + writable: true, + configurable: true, + value: IntersectionObserver, }); Object.defineProperty(globalThis, 'IntersectionObserver', { - writable: true, - configurable: true, - value: IntersectionObserver, + writable: true, + configurable: true, + value: IntersectionObserver, }); |
