Skip to content

Commit

Permalink
refactor: remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
goosewobbler committed Dec 12, 2023
1 parent 82c6a20 commit a610056
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
15 changes: 0 additions & 15 deletions example-cjs/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { app, BrowserWindow, ipcMain } from 'electron';
import { isTest } from './util';

declare global {
var mainProcessGlobal: string;
var ipcEventCount: number;
}

if (isTest) {
import('wdio-electron-service/main');
}
Expand All @@ -20,9 +15,6 @@ app.on('ready', () => {
console.warn('main warn');
console.error('main error');

global.mainProcessGlobal = 'foo';
global.ipcEventCount = 0;

mainWindow = new BrowserWindow({
x: 25,
y: 35,
Expand Down Expand Up @@ -55,11 +47,4 @@ app.on('ready', () => {
const bounds = mainWindow.getBounds();
mainWindow.setBounds({ ...bounds, height: bounds.height - 10, width: bounds.width - 10 });
});

// custom main process API
ipcMain.handle('wdio-electron', () => 'test');
});

ipcMain.on('ipc-event', (event, count) => {
global.ipcEventCount += count;
});
15 changes: 0 additions & 15 deletions example/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { app, BrowserWindow, ipcMain } from 'electron';
import { isTest } from './util.js';

declare global {
var mainProcessGlobal: string;
var ipcEventCount: number;
}

if (isTest) {
import('wdio-electron-service/main');
}
Expand All @@ -20,9 +15,6 @@ app.on('ready', () => {
console.warn('main warn');
console.error('main error');

global.mainProcessGlobal = 'foo';
global.ipcEventCount = 0;

mainWindow = new BrowserWindow({
x: 25,
y: 35,
Expand Down Expand Up @@ -55,11 +47,4 @@ app.on('ready', () => {
const bounds = mainWindow.getBounds();
mainWindow.setBounds({ ...bounds, height: bounds.height - 10, width: bounds.width - 10 });
});

// custom main process API
ipcMain.handle('wdio-electron', () => 'test');
});

ipcMain.on('ipc-event', (event, count) => {
global.ipcEventCount += count;
});

0 comments on commit a610056

Please sign in to comment.