mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-21 00:11:27 -07:00
feat(core): add Electron runtime, services, and app composition
This commit is contained in:
24
src/main/runtime/overlay-shortcuts-runtime-handlers.test.ts
Normal file
24
src/main/runtime/overlay-shortcuts-runtime-handlers.test.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import { createOverlayShortcutsRuntimeHandlers } from './overlay-shortcuts-runtime-handlers';
|
||||
|
||||
test('overlay shortcuts runtime handlers compose lifecycle handlers', () => {
|
||||
const calls: string[] = [];
|
||||
const runtime = createOverlayShortcutsRuntimeHandlers({
|
||||
overlayShortcutsRuntimeMainDeps: {
|
||||
overlayShortcutsRuntime: {
|
||||
registerOverlayShortcuts: () => calls.push('register'),
|
||||
unregisterOverlayShortcuts: () => calls.push('unregister'),
|
||||
syncOverlayShortcuts: () => calls.push('sync'),
|
||||
refreshOverlayShortcuts: () => calls.push('refresh'),
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
runtime.registerOverlayShortcuts();
|
||||
runtime.unregisterOverlayShortcuts();
|
||||
runtime.syncOverlayShortcuts();
|
||||
runtime.refreshOverlayShortcuts();
|
||||
|
||||
assert.deepEqual(calls, ['register', 'unregister', 'sync', 'refresh']);
|
||||
});
|
||||
Reference in New Issue
Block a user