mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-26 00:55:16 -07:00
Fix Jellyfin Login (#76)
This commit is contained in:
@@ -56,6 +56,23 @@ test('createCreateJellyfinSetupWindowHandler builds jellyfin setup window', () =
|
||||
});
|
||||
});
|
||||
|
||||
test('createCreateJellyfinSetupWindowHandler wires optional preload bridge', () => {
|
||||
const captured: { options?: Electron.BrowserWindowConstructorOptions } = {};
|
||||
const createSetupWindow = createCreateJellyfinSetupWindowHandler({
|
||||
createBrowserWindow: (nextOptions) => {
|
||||
captured.options = nextOptions;
|
||||
return { id: 'jellyfin' } as never;
|
||||
},
|
||||
preloadPath: 'C:\\SubMiner\\dist\\preload-jellyfin-setup.js',
|
||||
});
|
||||
|
||||
assert.deepEqual(createSetupWindow(), { id: 'jellyfin' });
|
||||
const options = captured.options;
|
||||
assert.ok(options);
|
||||
assert.equal(options.webPreferences?.preload, 'C:\\SubMiner\\dist\\preload-jellyfin-setup.js');
|
||||
assert.equal(options.webPreferences?.sandbox, true);
|
||||
});
|
||||
|
||||
test('createCreateAnilistSetupWindowHandler builds anilist setup window', () => {
|
||||
let options: Electron.BrowserWindowConstructorOptions | null = null;
|
||||
const createSetupWindow = createCreateAnilistSetupWindowHandler({
|
||||
|
||||
Reference in New Issue
Block a user