mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-20 12:11:28 -07:00
25 lines
905 B
TypeScript
25 lines
905 B
TypeScript
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']);
|
|
});
|