UNPKG

@baseplate-dev/sync

Version:

Library for syncing Baseplate descriptions

27 lines 1.29 kB
import type { TemplateExtractorHook, TemplateExtractorPlugin, TemplateExtractorPluginApi } from '../runner/template-extractor-plugin.js'; import { TemplateExtractorContext } from '../runner/template-extractor-context.js'; /** * Mock API for testing plugin hook registration */ export declare function createMockPluginApi(): { api: TemplateExtractorPluginApi; getRegisteredHooks: () => Map<TemplateExtractorHook, (() => void | Promise<void>)[]>; executeHooks: (hook: TemplateExtractorHook) => Promise<void>; }; /** * Creates a plugin instance for testing */ export declare function createPluginInstance<T>(plugin: TemplateExtractorPlugin<string, T>, context: TemplateExtractorContext, api?: TemplateExtractorPluginApi): Promise<{ instance: T; api: TemplateExtractorPluginApi; executeHooks: (hook: TemplateExtractorHook) => Promise<void>; }>; /** * Helper to test plugin with dependencies */ export declare function createPluginInstanceWithDependencies<T>(plugin: TemplateExtractorPlugin<string, T>, context: TemplateExtractorContext, dependencyInstances: Map<string, unknown>): Promise<{ instance: T; api: TemplateExtractorPluginApi; executeHooks: (hook: TemplateExtractorHook) => Promise<void>; }>; //# sourceMappingURL=plugin-test-utils.d.ts.map