stock_analysis / apps /dsa-web /src /setupTests.ts
liuqiaoyi
Initial commit: daily stock analysis system
74e7808
Raw History Blame Contribute Delete
423 Bytes
import '@testing-library/jest-dom';
class IntersectionObserverMock implements IntersectionObserver {
readonly root = null;
readonly rootMargin = '';
readonly thresholds = [0];
disconnect() {}
observe() {}
takeRecords(): IntersectionObserverEntry[] {
return [];
}
unobserve() {}
}
Object.defineProperty(globalThis, 'IntersectionObserver', {
writable: true,
value: IntersectionObserverMock,
});