polyv-live-cli
Version:
CLI tool for managing PolyV live streaming services.
59 lines • 1.91 kB
TypeScript
import { Command } from 'commander';
export declare const mockAuthConfig: {
appId: string;
appSecret: string;
userId: string;
};
export declare const mockServiceConfig: {
baseUrl: string;
timeout: number;
debug: boolean;
};
export interface MockAuthResult {
config: typeof mockAuthConfig;
source: string;
accountName: string | null;
}
export interface MockConfigResult {
config: typeof mockServiceConfig;
}
export declare function getAuthAdapterMockDefinition(): {
authAdapter: {
tryGetAuthConfig: jest.Mock<any, any, any>;
getStatusMessage: jest.Mock<any, any, any>;
};
};
export declare function getConfigManagerMockDefinition(): {
configManager: {
load: jest.Mock<any, any, any>;
};
};
export declare function createTestProgram(): Command;
export declare function mockAuthSuccess(authAdapter: {
tryGetAuthConfig: jest.Mock;
getStatusMessage: jest.Mock;
}, configManager: {
load: jest.Mock;
}, options?: {
source?: string;
accountName?: string | null;
baseUrl?: string;
timeout?: number;
debug?: boolean;
}): void;
export declare function mockAuthFailure(authAdapter: {
tryGetAuthConfig: jest.Mock;
getStatusMessage: jest.Mock;
}, message?: string): void;
export declare function mockConfigError(configManager: {
load: jest.Mock;
}, errorMessage: string): void;
export declare function createMockHandler<T extends Record<string, any>>(methods: T): {
[K in keyof T]: jest.Mock;
};
export declare function suppressConsole(): () => void;
export declare function mockProcessExit(): () => void;
export declare function tick(ms?: number): Promise<void>;
export declare function parseCommandAsync(program: Command, args: string[]): Promise<void>;
export declare function createMockParentOptions(options?: Record<string, any>): Record<string, any>;
//# sourceMappingURL=test-helpers.d.ts.map