/**
 * TestArgs type.
 * @typedef {object} TestArgs
 * @property {Application} [application] - Application instance for integration tests.
 * @property {RequestClient} [client] - HTTP client for request tests.
 * @property {object} [databaseCleaning] - Database cleanup options for tests.
 * @property {boolean} [databaseCleaning.transaction] - Use transactions to rollback between tests.
 * @property {boolean} [databaseCleaning.truncate] - Truncate tables between tests.
 * @property {boolean} [focus] - Whether this test is focused.
 * @property {() => (void|Promise<void>)} [function] - Test callback function.
 * @property {number} [retry] - Number of retries when a test fails.
 * @property {string[] | string} [tags] - Tags for filtering.
 * @property {number} [timeoutSeconds] - Timeout in seconds for the test.
 * @property {string} [type] - Test type identifier.
 */
/**
 * TestData type.
 * @typedef {object} TestData
 * @property {TestArgs} args - Arguments passed to the test.
 * @property {string} [filePath] - Source file path.
 * @property {number} [line] - Source line number.
 * @property {function(TestArgs) : (void|Promise<void>)} function - Test callback to execute.
 */
/**
 * FailedTestDetail type.
 * @typedef {object} FailedTestDetail
 * @property {string} fullDescription - Full test description.
 * @property {string} [filePath] - Source file path.
 * @property {number} [line] - Source line number.
 * @property {?} error - Failure error.
 * @property {string} [consoleOutput] - Captured console output while test ran.
 * @property {string} [consoleLogPath] - Saved console log path.
 */
/**
 * ActiveAfterAllScopeEntry type.
 * @typedef {object} ActiveAfterAllScopeEntry
 * @property {TestsArgument} tests - Scope test tree.
 * @property {boolean} afterAllsRun - Whether cleanup hooks have run.
 */
/**
 * Defines this typedef.
 * @typedef {function({configuration: import("../configuration.js").default, testArgs: TestArgs, testData: TestData}) : (void|Promise<void>)} AfterBeforeEachCallbackType
 */
/**
 * AfterBeforeEachCallbackObjectType type.
 * @typedef {object} AfterBeforeEachCallbackObjectType
 * @property {AfterBeforeEachCallbackType} callback - Hook callback to execute.
 */
/**
 * Defines this typedef.
 * @typedef {function({configuration: import("../configuration.js").default}) : (void|Promise<void>)} BeforeAfterAllCallbackType
 */
/**
 * BeforeAfterAllCallbackObjectType type.
 * @typedef {object} BeforeAfterAllCallbackObjectType
 * @property {BeforeAfterAllCallbackType} callback - Hook callback to execute.
 */
/**
 * TestsArgument type.
 * @typedef {object} TestsArgument
 * @property {Record<string, TestData>} args - Arguments keyed by test description.
 * @property {boolean} [anyTestsFocussed] - Whether any tests in the tree are focused.
 * @property {AfterBeforeEachCallbackObjectType[]} afterEaches - After-each hooks for this scope.
 * @property {BeforeAfterAllCallbackObjectType[]} afterAlls - After-all hooks for this scope.
 * @property {BeforeAfterAllCallbackObjectType[]} beforeAlls - Before-all hooks for this scope.
 * @property {AfterBeforeEachCallbackObjectType[]} beforeEaches - Before-each hooks for this scope.
 * @property {string} [filePath] - Source file path.
 * @property {number} [line] - Source line number.
 * @property {Record<string, TestData>} tests - A unique identifier for the node.
 * @property {Record<string, TestsArgument>} subs - Optional child nodes. Each item is another `Node`, allowing recursion.
 */
export default class TestRunner {
    /**
     * Runs constructor.
     * @param {object} args - Options object.
     * @param {import("../configuration.js").default} args.configuration - Configuration instance.
     * @param {string[] | string} [args.excludeTags] - Tags to exclude.
     * @param {string[] | string} [args.includeTags] - Tags to include.
     * @param {Array<string>} args.testFiles - Test files.
     * @param {Record<string, number[]>} [args.lineFilters] - Line filters by file.
     * @param {RegExp[]} [args.examplePatterns] - Example patterns.
     */
    constructor({ configuration, excludeTags, includeTags, testFiles, lineFilters, examplePatterns, ...restArgs }: {
        configuration: import("../configuration.js").default;
        excludeTags?: string | string[] | undefined;
        includeTags?: string | string[] | undefined;
        testFiles: Array<string>;
        lineFilters?: Record<string, number[]> | undefined;
        examplePatterns?: RegExp[] | undefined;
    });
    /**
     * Narrows the runtime value to the documented type.
      @type {ActiveAfterAllScopeEntry[]} */
    _activeAfterAllScopes: ActiveAfterAllScopeEntry[];
    /**
     * Narrows the runtime value to the documented type.
      @type {FailedTestDetail[]} */
    _failedTestDetails: FailedTestDetail[];
    _configuration: import("../configuration.js").default;
    _excludeTags: string[];
    _excludeTagSet: Set<string>;
    _includeTags: string[];
    _includeTagSet: Set<string>;
    _testFiles: string[];
    _lineFilters: Record<string, number[]>;
    _examplePatterns: RegExp[];
    _failedTests: number;
    _successfulTests: number;
    _testsCount: number;
    /**
     * Runs get configuration.
     * @returns {import("../configuration.js").default} - The configuration.
     */
    getConfiguration(): import("../configuration.js").default;
    /**
     * Runs get test files.
     * @returns {string[]} - The test files.
     */
    getTestFiles(): string[];
    /**
     * Runs get line filters.
     * @returns {Record<string, number[]>} - Line filters.
     */
    getLineFilters(): Record<string, number[]>;
    /**
     * Runs get example patterns.
     * @returns {RegExp[]} - Example patterns.
     */
    getExamplePatterns(): RegExp[];
    /**
     * Runs normalize tags.
     * @param {string[] | string | undefined} tags - Tags.
     * @returns {string[]} - Normalized tags.
     */
    normalizeTags(tags: string[] | string | undefined): string[];
    /**
     * Runs has tag.
     * @param {TestArgs} testArgs - Test args.
     * @param {string} tag - Tag to check for.
     * @returns {boolean} - Whether tag is present.
     */
    hasTag(testArgs: TestArgs, tag: string): boolean;
    /**
     * Runs is browser test mode.
     * @returns {boolean} - Whether running browser tests.
     */
    isBrowserTestMode(): boolean;
    /**
     * Runs run with dummy if needed.
     * @param {TestArgs} testArgs - Test args.
     * @param {() => Promise<void>} callback - Callback to run.
     * @returns {Promise<void>} - Resolves when complete.
     */
    runWithDummyIfNeeded(testArgs: TestArgs, callback: () => Promise<void>): Promise<void>;
    /**
     * Runs run node dummy.
     * @param {() => Promise<void>} callback - Callback to run.
     * @returns {Promise<void>} - Resolves when complete.
     */
    runNodeDummy(callback: () => Promise<void>): Promise<void>;
    /**
     * Runs default dummy path.
     * @returns {string} - Default dummy helper path.
     */
    defaultDummyPath(): string;
    /**
     * Runs run browser dummy.
     * @param {() => Promise<void>} callback - Callback to run.
     * @returns {Promise<void>} - Resolves when complete.
     */
    runBrowserDummy(callback: () => Promise<void>): Promise<void>;
    /**
     * Runs truncate databases.
     * @param {Record<string, import("../database/drivers/base.js").default>} dbs - Database connections.
     * @returns {Promise<void>} - Resolves when complete.
     */
    truncateDatabases(dbs: Record<string, import("../database/drivers/base.js").default>): Promise<void>;
    /**
     * Runs get exclude tag set.
     * @returns {Set<string>} - Exclude tag set.
     */
    getExcludeTagSet(): Set<string>;
    /**
     * Runs has matching tag.
     * @param {string[] | string | undefined} testTags - Test tags.
     * @param {Set<string>} tagSet - Tag set.
     * @returns {boolean} - Whether any tags match.
     */
    hasMatchingTag(testTags: string[] | string | undefined, tagSet: Set<string>): boolean;
    /**
     * Runs has runnable tests.
     * @param {TestsArgument} tests - Tests.
     * @param {string[]} [descriptions] - Description stack.
     * @param {boolean} [lineMatchedInScope] - Whether line matched in scope.
     * @returns {boolean} - Whether any tests in this scope will run.
     */
    hasRunnableTests(tests: TestsArgument, descriptions?: string[], lineMatchedInScope?: boolean): boolean;
    /**
     * Runs should skip test.
     * @param {TestArgs} testArgs - Test args.
     * @param {TestData} testData - Test data.
     * @param {string} testDescription - Test description.
     * @param {string[]} descriptions - Description stack.
     * @param {boolean} lineMatchedInScope - Whether line matched in scope.
     * @returns {boolean} - Whether the test should be skipped.
     */
    shouldSkipTest(testArgs: TestArgs, testData: TestData, testDescription: string, descriptions: string[], lineMatchedInScope: boolean): boolean;
    /**
     * Runs matches line filter.
     * @param {TestData | TestsArgument} entry - Test entry.
     * @returns {boolean} - Whether line filter matches entry.
     */
    matchesLineFilter(entry: TestData | TestsArgument): boolean;
    /**
     * Runs build full description.
     * @param {string[]} descriptions - Description stack.
     * @param {string} testDescription - Test description.
     * @returns {string} - Full description.
     */
    buildFullDescription(descriptions: string[], testDescription: string): string;
    /**
     * Runs application.
     * @returns {Promise<Application>} - Resolves with the application.
     */
    application(): Promise<Application>;
    _application: Application | undefined;
    /**
     * Runs request client.
     * @returns {Promise<RequestClient>} - Resolves with the request client.
     */
    requestClient(): Promise<RequestClient>;
    _requestClient: RequestClient | undefined;
    /**
     * Runs import test files.
     * @returns {Promise<void>} - Resolves when complete.
     */
    importTestFiles(): Promise<void>;
    /**
     * Runs is failed.
     * @returns {boolean} - Whether failed.
     */
    isFailed(): boolean;
    /**
     * Runs get failed tests.
     * @returns {number} - The failed tests.
     */
    getFailedTests(): number;
    /**
     * Runs get failed test details.
     * @returns {FailedTestDetail[]} - Failed test details.
     */
    getFailedTestDetails(): FailedTestDetail[];
    /**
     * Runs persist failed test console outputs to assets.
     * @param {object} [args] - Options object.
     * @param {string} [args.assetsPath] - Assets directory path.
     * @returns {Promise<string[]>} - Written log file paths.
     */
    persistFailedTestConsoleOutputsToAssets({ assetsPath }?: {
        assetsPath?: string | undefined;
    }): Promise<string[]>;
    /**
     * Runs get successful tests.
     * @returns {number} - The successful tests.
     */
    getSuccessfulTests(): number;
    /**
     * Runs get tests count.
     * @returns {number} - The tests count.
     */
    getTestsCount(): number;
    /**
     * Runs get executed tests count.
     * @returns {number} - The executed tests count.
     */
    getExecutedTestsCount(): number;
    /**
     * Runs prepare.
     * @returns {Promise<void>} - Resolves when complete.
     */
    prepare(): Promise<void>;
    anyTestsFocussed: boolean | undefined;
    _onlyFocussed: boolean | undefined;
    /**
     * Runs are any tests focussed.
     * @returns {boolean} - Whether any tests focussed.
     */
    areAnyTestsFocussed(): boolean;
    /**
     * Runs run.
     * @returns {Promise<void>} - Resolves when complete.
     */
    run(): Promise<void>;
    /**
     * Runs run after alls for active scopes.
     * @returns {Promise<void>} - Resolves when cleanup hooks finish.
     */
    runAfterAllsForActiveScopes(): Promise<void>;
    /**
     * Runs analyze tests.
     * @param {TestsArgument} tests - Tests.
     * @returns {{anyTestsFocussed: boolean}} - Whether any tests in the tree are focused.
     */
    analyzeTests(tests: TestsArgument): {
        anyTestsFocussed: boolean;
    };
    /**
     * Runs run tests.
     * @param {object} args - Options object.
     * @param {Array<AfterBeforeEachCallbackObjectType>} args.afterEaches - After eaches.
     * @param {Array<AfterBeforeEachCallbackObjectType>} args.beforeEaches - Before eaches.
     * @param {TestsArgument} args.tests - Tests.
     * @param {string[]} args.descriptions - Descriptions.
     * @param {number} args.indentLevel - Indent level.
     * @param {boolean} [args.lineMatchedInScope] - Whether line matched in scope.
     * @returns {Promise<void>} - Resolves when complete.
     */
    runTests({ afterEaches, beforeEaches, tests, descriptions, indentLevel, lineMatchedInScope }: {
        afterEaches: Array<AfterBeforeEachCallbackObjectType>;
        beforeEaches: Array<AfterBeforeEachCallbackObjectType>;
        tests: TestsArgument;
        descriptions: string[];
        indentLevel: number;
        lineMatchedInScope?: boolean | undefined;
    }): Promise<void>;
    /**
     * Runs run after alls for scope.
     * @param {ActiveAfterAllScopeEntry} scopeEntry - Scope entry.
     * @returns {Promise<void>} - Resolves when scope cleanup finishes.
     */
    runAfterAllsForScope(scopeEntry: ActiveAfterAllScopeEntry): Promise<void>;
    /**
     * Runs emit event.
     * @param {string} eventName - Event name.
     * @param {object} payload - Event payload.
     * @returns {Promise<void>} - Resolves when all listeners complete.
     */
    emitEvent(eventName: string, payload: object): Promise<void>;
    /**
     * Runs print rerun command.
     * @param {object} args - Options object.
     * @param {string[]} args.descriptions - Description stack.
     * @param {string} args.testDescription - Test description.
     * @param {TestData} args.testData - Test data.
     * @param {string} args.leftPadding - Left padding.
     * @returns {void} - No return value.
     */
    printRerunCommand({ descriptions, testDescription, testData, leftPadding }: {
        descriptions: string[];
        testDescription: string;
        testData: TestData;
        leftPadding: string;
    }): void;
    /**
     * Runs build rerun command.
     * @param {object} args - Options object.
     * @param {string[]} args.descriptions - Description stack.
     * @param {string} args.testDescription - Test description.
     * @param {TestData} args.testData - Test data.
     * @returns {string | undefined} - Rerun command.
     */
    buildRerunCommand({ descriptions, testDescription, testData }: {
        descriptions: string[];
        testDescription: string;
        testData: TestData;
    }): string | undefined;
    /**
     * Runs build console output.
     * @param {AttemptConsoleOutput[]} attemptConsoleOutputs - Attempt output entries.
     * @returns {string} - Combined console output.
     */
    buildConsoleOutput(attemptConsoleOutputs: AttemptConsoleOutput[]): string;
    /**
     * Runs get failed console output max lines.
     * @returns {number} - Maximum failed console lines.
     */
    getFailedConsoleOutputMaxLines(): number;
    /**
     * Runs truncate failed console output lines.
     * @param {string} consoleOutput - Console output.
     * @returns {string[]} - Lines for inline output.
     */
    truncateFailedConsoleOutputLines(consoleOutput: string): string[];
    /**
     * Runs print failed console output.
     * @param {object} args - Options object.
     * @param {string} args.consoleOutput - Console output.
     * @param {string} args.leftPadding - Left padding.
     * @returns {void} - No return value.
     */
    printFailedConsoleOutput({ consoleOutput, leftPadding }: {
        consoleOutput: string;
        leftPadding: string;
    }): void;
    /**
     * Runs start console capture.
     * @param {object} [args] - Options object.
     * @param {boolean} [args.passthrough] - Whether to pass through to the original console.
     * @returns {() => string} - Stops the capture and returns captured text.
     */
    startConsoleCapture({ passthrough }?: {
        passthrough?: boolean | undefined;
    }): () => string;
}
/**
 * AttemptConsoleOutput type.
 */
export type AttemptConsoleOutput = {
    /**
     * - Attempt number.
     */
    attemptNumber: number;
    /**
     * - Captured console output.
     */
    output: string;
};
/**
 * ConsoleMethodName type.
 */
export type ConsoleMethodName = "log" | "info" | "warn" | "error" | "debug";
/**
 * TestArgs type.
 */
export type TestArgs = {
    /**
     * - Application instance for integration tests.
     */
    application?: Application | undefined;
    /**
     * - HTTP client for request tests.
     */
    client?: RequestClient | undefined;
    /**
     * - Database cleanup options for tests.
     */
    databaseCleaning?: {
        /**
         * - Use transactions to rollback between tests.
         */
        transaction?: boolean | undefined;
        /**
         * - Truncate tables between tests.
         */
        truncate?: boolean | undefined;
    } | undefined;
    /**
     * - Whether this test is focused.
     */
    focus?: boolean | undefined;
    /**
     * - Test callback function.
     */
    function?: (() => (void | Promise<void>)) | undefined;
    /**
     * - Number of retries when a test fails.
     */
    retry?: number | undefined;
    /**
     * - Tags for filtering.
     */
    tags?: string | string[] | undefined;
    /**
     * - Timeout in seconds for the test.
     */
    timeoutSeconds?: number | undefined;
    /**
     * - Test type identifier.
     */
    type?: string | undefined;
};
/**
 * TestData type.
 */
export type TestData = {
    /**
     * - Arguments passed to the test.
     */
    args: TestArgs;
    /**
     * - Source file path.
     */
    filePath?: string | undefined;
    /**
     * - Source line number.
     */
    line?: number | undefined;
    /**
     * - Test callback to execute.
     */
    function: (arg0: TestArgs) => (void | Promise<void>);
};
/**
 * FailedTestDetail type.
 */
export type FailedTestDetail = {
    /**
     * - Full test description.
     */
    fullDescription: string;
    /**
     * - Source file path.
     */
    filePath?: string | undefined;
    /**
     * - Source line number.
     */
    line?: number | undefined;
    /**
     * - Failure error.
     */
    error: unknown;
    /**
     * - Captured console output while test ran.
     */
    consoleOutput?: string | undefined;
    /**
     * - Saved console log path.
     */
    consoleLogPath?: string | undefined;
};
/**
 * ActiveAfterAllScopeEntry type.
 */
export type ActiveAfterAllScopeEntry = {
    /**
     * - Scope test tree.
     */
    tests: TestsArgument;
    /**
     * - Whether cleanup hooks have run.
     */
    afterAllsRun: boolean;
};
/**
 * Defines this typedef.
 */
export type AfterBeforeEachCallbackType = (arg0: {
    configuration: import("../configuration.js").default;
    testArgs: TestArgs;
    testData: TestData;
}) => (void | Promise<void>);
/**
 * AfterBeforeEachCallbackObjectType type.
 */
export type AfterBeforeEachCallbackObjectType = {
    /**
     * - Hook callback to execute.
     */
    callback: AfterBeforeEachCallbackType;
};
/**
 * Defines this typedef.
 */
export type BeforeAfterAllCallbackType = (arg0: {
    configuration: import("../configuration.js").default;
}) => (void | Promise<void>);
/**
 * BeforeAfterAllCallbackObjectType type.
 */
export type BeforeAfterAllCallbackObjectType = {
    /**
     * - Hook callback to execute.
     */
    callback: BeforeAfterAllCallbackType;
};
/**
 * TestsArgument type.
 */
export type TestsArgument = {
    /**
     * - Arguments keyed by test description.
     */
    args: Record<string, TestData>;
    /**
     * - Whether any tests in the tree are focused.
     */
    anyTestsFocussed?: boolean | undefined;
    /**
     * - After-each hooks for this scope.
     */
    afterEaches: AfterBeforeEachCallbackObjectType[];
    /**
     * - After-all hooks for this scope.
     */
    afterAlls: BeforeAfterAllCallbackObjectType[];
    /**
     * - Before-all hooks for this scope.
     */
    beforeAlls: BeforeAfterAllCallbackObjectType[];
    /**
     * - Before-each hooks for this scope.
     */
    beforeEaches: AfterBeforeEachCallbackObjectType[];
    /**
     * - Source file path.
     */
    filePath?: string | undefined;
    /**
     * - Source line number.
     */
    line?: number | undefined;
    /**
     * - A unique identifier for the node.
     */
    tests: Record<string, TestData>;
    /**
     * - Optional child nodes. Each item is another `Node`, allowing recursion.
     */
    subs: Record<string, TestsArgument>;
};
import Application from "../../src/application.js";
import RequestClient from "./request-client.js";
//# sourceMappingURL=test-runner.d.ts.map