UNPKG

@wdio/mocha-framework

Version:
37 lines • 1.51 kB
import type { FormattedMessage, FrameworkMessage, MochaError, MochaOpts } from './types.js'; type HookKind = NonNullable<FormattedMessage['hookKind']>; export declare const TITLE_KINDS: Record<string, HookKind>; /** * Logs a hook whose title rule (`"before all" hook ...`) disagrees with its kind */ export declare function checkHookKind(hook: { title?: string; originalTitle?: string; }, kind: HookKind): HookKind; /** * The kind of a Mocha hook from the hook list of its suite */ export declare function mochaHookKind(hook: { title?: string; originalTitle?: string; parent?: unknown; }): HookKind | undefined; export interface TitledNode { title?: string; parent?: TitledNode | null; } export declare function dottedFullTitle(title: string, parent?: TitledNode | null): string; /** * The error of a reporter message, also used by parallel mode */ export declare function formatError(err: MochaError, testName: string): MochaError; export declare function formatMessage(params: FrameworkMessage): FormattedMessage; /** * Mocha skips tests after a failing `before` or `beforeEach` and reports only * the hook. Fail those tests unless the user turned the option off. */ export declare function applyMochaDefaults(mochaOpts: MochaOpts): MochaOpts; type Hook = Function | Function[]; export declare function setupEnv(cid: string, options: MochaOpts, beforeTest: Hook, beforeHook: Hook, afterTest: Hook, afterHook: Hook): void; export {}; //# sourceMappingURL=common.d.ts.map