refactor: await native operations across the bridge lifecycle
This commit is contained in:
1 parent
1faa6c58fa
commit
9b165a8971
24 files changed
+241
-177
No files matched your search
@@ -68,8 +68,11 @@ function makeManager(
|
||||
bridgeManager,
|
||||
pipeWatcher,
|
||||
injector: {
|
||||
inject: vi.fn(() => ({ method: 'loadModuleManual' as const, handle: DUMMY_HANDLE })),
|
||||
unload: vi.fn(),
|
||||
inject: vi.fn(async () => ({
|
||||
method: 'loadModuleManual' as const,
|
||||
handle: DUMMY_HANDLE,
|
||||
})),
|
||||
unload: vi.fn(async () => {}),
|
||||
},
|
||||
makeClient: clientFactory,
|
||||
listProcesses: async () => pids.map((pid) => ({ pid, name: 'qq', path: '' })),
|
||||
@@ -174,11 +177,11 @@ describe('HookManager.onSessionsChanged', () => {
|
||||
} as unknown as BridgeManagerSink,
|
||||
pipeWatcher,
|
||||
injector: {
|
||||
inject: vi.fn(() => ({
|
||||
inject: vi.fn(async () => ({
|
||||
method: 'loadModuleManual' as const,
|
||||
handle: DUMMY_HANDLE,
|
||||
})),
|
||||
unload: vi.fn(),
|
||||
unload: vi.fn(async () => {}),
|
||||
},
|
||||
makeClient: vi.fn(() => {
|
||||
const c = new EventEmitter() as any;
|
||||
|
||||
Reference in new issue
Block a user