Files
iptvnator/src/app/services/electron.service.stub.ts
T
2024-12-01 16:29:24 +01: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';
}
}