import Macroable from '@poppinss/macroable';
import { Test } from '../test/main.js';
import { Refiner } from '../refiner.js';
import { Emitter } from '../emitter.js';
import type { GroupHooksHandler, TestHooksHandler, GroupOptions } from '../types.js';
/**
 * Group class exposes an API to group multiple tests together
 * and bulk configure them.
 *
 * NOTE: Nested groups are not supported on purpose.
 *
 * @example
 * const group = new Group('addition', emitter, refiner)
 * const test = new Test('2 + 2 = 4', emitter, refiner)
 *
 * group.add(test)
 * await group.exec()
 */
export declare class Group<Context extends Record<any, any>> extends Macroable {
    #private;
    title: string;
    /**
     * Know if one or more tests/hooks within this group
     * has failed.
     */
    get failed(): boolean;
    options: GroupOptions;
    /**
     * An array of tests registered under the given group
     */
    tests: Test<Context, any>[];
    /**
     * Shortcut methods to configure tests
     */
    each: {
        setup: (handler: TestHooksHandler<Context>) => void;
        teardown: (handler: TestHooksHandler<Context>) => void;
        timeout: (timeout: number) => void;
        retry: (retries: number) => void;
        skip: (skip?: boolean | (() => Promise<boolean> | boolean), skipReason?: string) => void;
        disableTimeout: () => void;
    };
    constructor(title: string, emitter: Emitter, refiner: Refiner);
    /**
     * Enable/disable the bail mode. In bail mode, all
     * upcoming tests will be skipped when the current
     * test fails
     */
    bail(toggle?: boolean): this;
    /**
     * Add a test to the group. Adding a test to the group
     * mutates the test properties
     */
    add(test: Test<Context, any>): this;
    /**
     * Tap into each test and configure it
     */
    tap(callback: (test: Test<Context, any>) => void): this;
    /**
     * Define setup hook for the group
     */
    setup(handler: GroupHooksHandler<Context>): this;
    /**
     * Define teardown hook for the group
     */
    teardown(handler: GroupHooksHandler<Context>): this;
    /**
     * Execute group hooks and tests
     */
    exec(): Promise<void>;
}
