UNPKG

@baseplate-dev/sync

Version:

Library for syncing Baseplate descriptions

30 lines 894 B
import { GeneratorTaskOutputBuilder } from './generator-task-output.js'; /** * Creates a test task output builder * * @param context - The context to use for the builder * @returns The builder */ export function createTestTaskOutputBuilder(context = {}) { return new GeneratorTaskOutputBuilder({ generatorInfo: { name: 'test-generator', baseDirectory: '/root/pkg/test-generator', }, generatorId: 'test-generator-id', ...context, }); } /** * Tests an action * * @param action - The action to test * @param context - The context to use for the builder * @returns The output of the builder */ export async function testAction(action, context) { const builder = createTestTaskOutputBuilder(context); await action.execute(builder); return builder.output; } //# sourceMappingURL=builder-action-test-helpers.js.map