test(migration): use static legacy Electron bootstrap

This commit is contained in:
4gray committed 2026-09-05 23:03:39 +02:00
1 parent d2234b11c4
commit 5ff6c24f04
1 file changed
+7 -1
@@ -100,7 +100,13 @@ export async function seedLegacyProfile(
);
await writeFile(
join(fixture, 'main.cjs'),
`const {app,BrowserWindow}=require('electron'); app.setPath('userData',${JSON.stringify(profile)}); app.whenReady().then(()=>new BrowserWindow({show:false,webPreferences:{sandbox:true}}).loadFile(${JSON.stringify(index)}));`
`const { app, BrowserWindow } = require('electron');
const { join } = require('path');
app.setPath('userData', join(__dirname, '..', 'electron-backend'));
app.whenReady().then(() => new BrowserWindow({
show: false,
webPreferences: { sandbox: true },
}).loadFile(join(__dirname, 'index.html')));`
);
const app = await electron.launch({
args: [