Skip to content

Commit 2fafb3f

Browse files
committed
Bump deps and test fixes
1 parent 3566435 commit 2fafb3f

File tree

7 files changed

+153
-230
lines changed

7 files changed

+153
-230
lines changed

jest-setup.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
11
// Jest setup provided by Grafana scaffolding
22
import './.config/jest-setup';
3+
import { TextEncoder, TextDecoder } from 'util';
4+
5+
global.TextEncoder = TextEncoder;
6+
global.TextDecoder = TextDecoder;
7+
8+
const mockIntersectionObserver = jest.fn().mockImplementation((arg) => ({
9+
observe: jest.fn().mockImplementation((elem) => {
10+
arg([{ target: elem, isIntersecting: true }]);
11+
}),
12+
unobserve: jest.fn(),
13+
disconnect: jest.fn(),
14+
}));
15+
16+
global.IntersectionObserver = mockIntersectionObserver;

0 commit comments

Comments
 (0)