mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 22:30:44 +00:00
test: tighten plugin loader hook assertion
This commit is contained in:
@@ -107,10 +107,10 @@ function countMatching<T>(items: readonly T[], predicate: (item: T) => boolean):
|
||||
}
|
||||
|
||||
function expectGlobalHookRunner(runner: ReturnType<typeof getGlobalHookRunner>): GlobalHookRunner {
|
||||
expect(runner).toEqual(expect.objectContaining({ hasHooks: expect.any(Function) }));
|
||||
if (runner === null) {
|
||||
throw new Error("Expected global hook runner");
|
||||
}
|
||||
expect(typeof runner.hasHooks).toBe("function");
|
||||
return runner;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user