Files
iptvnator/apps/web/src/app/services/electron.service.stub.ts
T
2025-10-07 18:02:13 +02:00

33 lines
575 B
TypeScript

export class ElectronServiceStub {
ipcRenderer = {
send: jest.fn(),
on: jest.fn(),
removeAllListeners: jest.fn(),
};
remote = {
process: {
platform: 'linux',
argv: [0, 1],
},
app: {
getVersion: jest.fn(() => '1.0.0'),
},
};
isElectron = true;
removeAllListeners(type: string) {}
getAppVersion() {
return this.remote.app.getVersion();
}
sendIpcEvent() {}
listenOn() {}
getAppEnvironment() {
return 'electron';
}
}