mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-09-20 05:16:18 -07:00
feat(overlay): discover unclaimed mpv key bindings (#246)
This commit is contained in:
@@ -1323,3 +1323,18 @@ test('registerIpcHandlers exposes character dictionary selection handlers', asyn
|
||||
assert.deepEqual(calls, [21355]);
|
||||
assert.deepEqual(searches, ['Re:ZERO']);
|
||||
});
|
||||
|
||||
test('mpv discovery has its own request and does not change session bindings', async () => {
|
||||
const { registrar, handlers } = createFakeIpcRegistrar();
|
||||
const snapshot = { keys: ['r'], blockedKeys: [] };
|
||||
registerIpcHandlers(
|
||||
createRegisterIpcDeps({ getMpvInputBindings: async () => snapshot }),
|
||||
registrar,
|
||||
);
|
||||
const discovery = handlers.handle.get(IPC_CHANNELS.request.getMpvInputBindings);
|
||||
const session = handlers.handle.get(IPC_CHANNELS.request.getSessionBindings);
|
||||
assert.ok(discovery);
|
||||
assert.ok(session);
|
||||
assert.deepEqual(await discovery({}), snapshot);
|
||||
assert.deepEqual(await session({}), []);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user