mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-04-09 16:19:25 -07:00
fix: stabilize coverage and immersion tracker tests
This commit is contained in:
@@ -11,21 +11,23 @@ function createSetupWindowHandler<TWindow>(
|
||||
deps: { createBrowserWindow: (options: Electron.BrowserWindowConstructorOptions) => TWindow },
|
||||
config: SetupWindowConfig,
|
||||
) {
|
||||
return (): TWindow =>
|
||||
deps.createBrowserWindow({
|
||||
return (): TWindow => {
|
||||
const options: Electron.BrowserWindowConstructorOptions = {
|
||||
width: config.width,
|
||||
height: config.height,
|
||||
title: config.title,
|
||||
show: true,
|
||||
autoHideMenuBar: true,
|
||||
resizable: config.resizable,
|
||||
minimizable: config.minimizable,
|
||||
maximizable: config.maximizable,
|
||||
webPreferences: {
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
},
|
||||
});
|
||||
};
|
||||
if (config.resizable !== undefined) options.resizable = config.resizable;
|
||||
if (config.minimizable !== undefined) options.minimizable = config.minimizable;
|
||||
if (config.maximizable !== undefined) options.maximizable = config.maximizable;
|
||||
return deps.createBrowserWindow(options);
|
||||
};
|
||||
}
|
||||
|
||||
export function createCreateFirstRunSetupWindowHandler<TWindow>(deps: {
|
||||
|
||||
Reference in New Issue
Block a user