Download src/gateway/server/__tests__/test-utils.ts from SaylorTwift/openclaw: direct link, hf CLI and curl.
- Browser
- Download file 688 Bytes
-
https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/gateway/server/__tests__/test-utils.ts
- Command line
-
hf download hf://SaylorTwift/openclaw/src/gateway/server/__tests__/test-utils.ts
-
curl -L -o test-utils.ts https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/gateway/server/__tests__/test-utils.ts
688 Bytes
| // Gateway server test utilities build plugin-registry fixtures for nested server suites. | |
| import { createEmptyPluginRegistry } from "../../../plugins/registry-empty.js"; | |
| import type { PluginRegistry } from "../../../plugins/registry.js"; | |
| /** | |
| * Shared plugin-registry fixtures for gateway server tests. | |
| */ | |
| export const createGatewayTestRegistry = ( | |
| overrides: Partial<PluginRegistry> = {}, | |
| ): PluginRegistry => { | |
| const registry = createEmptyPluginRegistry(); | |
| for (const key of Object.keys(overrides) as Array<keyof PluginRegistry>) { | |
| const value = overrides[key]; | |
| if (value !== undefined) { | |
| Object.assign(registry, { [key]: value }); | |
| } | |
| } | |
| return registry; | |
| }; | |