responsively-app/desktop-app/setupTests.js
2024-08-03 14:20:24 +02:00

24 lines
458 B
JavaScript

window.electron = {
ipcRenderer: {
sendMessage: jest.fn(),
on: jest.fn(),
once: jest.fn(),
invoke: jest.fn(),
removeListener: jest.fn(),
removeAllListeners: jest.fn(),
},
store: {
set: jest.fn(),
get: jest.fn(),
},
};
global.IntersectionObserver = jest.fn(() => ({
root: null,
rootMargin: '',
thresholds: [],
observe: jest.fn(),
unobserve: jest.fn(),
disconnect: jest.fn(),
takeRecords: jest.fn(),
}));