UNPKG

allure-js-commons

Version:
72 lines (71 loc) 2.68 kB
/// <reference types="node" /> /// <reference types="node" /> import type { SyncTestRuntime, TestRuntime } from "./types.js"; export declare const NOOP_RUNTIME_WARNING = "no test runtime is found. Please check test framework configuration"; export declare const NOOP_SYNC_RUNTIME_WARNING = "no sync test runtime is found. Please check test framework configuration and adapter sync support"; export declare const SYNC_STEP_PURE_FUNCTION_ERROR = "allure-js-commons/sync step body must be synchronous and must not return a Promise"; export declare class NoopSyncTestRuntime implements SyncTestRuntime { attachment(_: string, __: Buffer | Uint8Array | string, ___: { contentType: string; }): void; attachmentFromPath(_: string, __: string, ___: { contentType: string; }): void; globalAttachment(_: string, __: Buffer | Uint8Array | string, ___: { contentType: string; }): void; globalAttachmentFromPath(_: string, __: string, ___: { contentType: string; }): void; globalError(_: { message?: string; trace?: string; }): void; description(_: string): void; descriptionHtml(_: string): void; displayName(_: string): void; historyId(_: string): void; labels(..._: { name: string; value: string; }[]): void; links(..._: { url: string; type?: string; name?: string; }[]): void; parameter(_: string, __: string, ___?: { excluded?: boolean; mode?: string; }): void; logStep(_: string, __?: string, ___?: Error): void; step<T>(_: string, body: () => T): T; stepDisplayName(_: string): void; stepParameter(_: string, __: string, ___?: string): void; testCaseId(_: string): void; warning(): void; warnAboutPromiseStep(): void; } export declare const noopSyncRuntime: NoopSyncTestRuntime; export declare class NoopTestRuntime implements TestRuntime { sync: NoopSyncTestRuntime; attachment(): Promise<void>; attachmentFromPath(): Promise<void>; globalAttachment(): Promise<void>; globalAttachmentFromPath(): Promise<void>; globalError(): Promise<void>; description(): Promise<void>; descriptionHtml(): Promise<void>; displayName(): Promise<void>; historyId(): Promise<void>; labels(): Promise<void>; links(): Promise<void>; parameter(): Promise<void>; logStep(): Promise<void>; step<T>(_: string, body: () => T | PromiseLike<T>): Promise<T>; stepDisplayName(): Promise<void>; stepParameter(): Promise<void>; testCaseId(): Promise<void>; warning(): Promise<void>; } export declare const noopRuntime: TestRuntime;