UNPKG

@archer-edu/dxp-directus-cli

Version:
62 lines (61 loc) 1.75 kB
/// <reference types="node" /> import commander from "commander"; type GhostInspectorRunOptions = { apiKey?: string; suiteId?: string; startUrl?: string; pollInterval?: string | number; maxAttempts?: string | number; ignoreFailures?: boolean; apiBaseUrl?: string; }; type FetchInit = { method?: string; headers?: Record<string, string>; body?: string; }; type ResponseLike = { ok: boolean; status: number; statusText: string; text(): Promise<string>; }; type Fetcher = (url: string, init?: FetchInit) => Promise<ResponseLike>; type Logger = (message: string) => void; type GhostInspectorRunDependencies = { fetch?: Fetcher; sleep?: (milliseconds: number) => Promise<void>; logger?: Logger; env?: NodeJS.ProcessEnv; cwd?: string; }; type SuiteResult = { _id: string; name?: string; passing?: boolean | null; countPassing?: number; countFailing?: number; countUnknown?: number; countScreenshotComparePassing?: number; countScreenshotCompareFailing?: number; countScreenshotCompareUnknown?: number; dateExecutionFinished?: string | null; }; type TestResult = { _id: string; name?: string; testName?: string; passing?: boolean | null; url?: string; }; export type GhostInspectorRunSummary = { suiteId: string; suiteResultId: string; passing: boolean | null | undefined; ignoredFailure: boolean; result: SuiteResult; failedResults: TestResult[]; }; declare const register: (program: commander.Command) => void; export default register; export declare function runGhostInspector(options: GhostInspectorRunOptions, dependencies?: GhostInspectorRunDependencies): Promise<GhostInspectorRunSummary>;