* feat: add LINE plugin (#1630) (thanks @plum-dawg) * feat: complete LINE plugin (#1630) (thanks @plum-dawg) * chore: drop line plugin node_modules (#1630) (thanks @plum-dawg) * test: mock /context report in commands test (#1630) (thanks @plum-dawg) * test: limit macOS CI workers to avoid OOM (#1630) (thanks @plum-dawg) * test: reduce macOS CI vitest workers (#1630) (thanks @plum-dawg) --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
27 lines
670 B
TypeScript
27 lines
670 B
TypeScript
import type { PluginRegistry } from "../../../plugins/registry.js";
|
|
|
|
export const createTestRegistry = (overrides: Partial<PluginRegistry> = {}): PluginRegistry => {
|
|
const base: PluginRegistry = {
|
|
plugins: [],
|
|
tools: [],
|
|
hooks: [],
|
|
typedHooks: [],
|
|
channels: [],
|
|
providers: [],
|
|
gatewayHandlers: {},
|
|
httpHandlers: [],
|
|
httpRoutes: [],
|
|
cliRegistrars: [],
|
|
services: [],
|
|
commands: [],
|
|
diagnostics: [],
|
|
};
|
|
const merged = { ...base, ...overrides };
|
|
return {
|
|
...merged,
|
|
gatewayHandlers: merged.gatewayHandlers ?? {},
|
|
httpHandlers: merged.httpHandlers ?? [],
|
|
httpRoutes: merged.httpRoutes ?? [],
|
|
};
|
|
};
|