// SPDX-License-Identifier: Apache-2.0
// Copyright 2024-2026 Vorion LLC
/**
 * Shared test data factories for security module tests.
 */
import { vi } from 'vitest';
/**
 * Create a mock Fastify request object.
 */
export function createMockFastifyRequest(overrides = {}) {
    return {
        method: 'POST',
        url: '/api/v1/test',
        headers: {},
        body: {},
        query: {},
        params: {},
        ip: '127.0.0.1',
        routeOptions: { url: '/api/v1/test' },
        ...overrides,
    };
}
/**
 * Create a mock Fastify reply object.
 */
export function createMockFastifyReply() {
    const reply = {
        code: vi.fn(),
        send: vi.fn(),
        header: vi.fn(),
        setCookie: vi.fn(),
        status: vi.fn(),
    };
    reply.code.mockReturnValue(reply);
    reply.status.mockReturnValue(reply);
    reply.header.mockReturnValue(reply);
    return reply;
}
/**
 * Generic config builder — merges overrides into defaults.
 */
export function createMockConfig(defaults, overrides = {}) {
    return { ...defaults, ...overrides };
}
//# sourceMappingURL=factories.js.map