import type { TestAdapter } from './adapter'; import type { Expect } from './expect'; /** * Describe a test suite to run tests in * * @example * ```typescript * describe('Test suite', ({ test }) => { * test('Test', async ({ expect }) => { * expect(1).toBe(1); * }); * }); * ``` * * @param descriptionName The name of the test suite * @param callback The callback to run the tests, the callback will for convenience receive the * `test` function to run tests and the `custom` object that was passed to the test adapter */ export declare function describe(descriptionName: string, callback: (args: { test: typeof test; beforeEach: typeof beforeEach; afterEach: typeof afterEach; } & { custom: Awaited>; }) => void, customArgs?: Parameters[2]): void; /** * Run a test it can be either called inside a `describe` or on its own * * @example * ```typescript * test('Test', async ({ expect }) => { * expect(1).toBe(1); * }); * ``` * * @param testName The name of the test * @param callback The callback to run the test, the callback will for convenience receive the * `expect` function to run assertions and the `custom` object that was passed to the test adapter */ export declare function test(testName: string, callback: (args: { expect: typeof expect; } & { custom: Awaited>; }) => Promise | void, customArgs?: Parameters[2]): void; /** * Run a function before each test. * * @example * ```typescript * beforeEach(({ custom }) => { * db.init(); * }); * ``` * * @param callback The callback to run before each test, the callback will for convenience receive the * `custom` object that was passed to the test adapter */ export declare function beforeEach(callback: (args: { custom: Awaited>; }) => Promise | void, customArgs?: Parameters[2]): void; /** * Run a function after each test. * * @example * ```typescript * afterEach(({ custom }) => { * db.flush(); * }); * ``` * * @param callback - The callback to run after each test, the callback will for convenience receive the * `custom` object that was passed to the test adapter */ export declare function afterEach(callback: (args: { custom: Awaited>; }) => Promise | void, customArgs?: Parameters[2]): void; /** * Run a function before all tests. * * @example * ```typescript * beforeAll(({ custom }) => { * db.seed(); * }); * ``` * * @param callback - The callback to run before all tests, the callback will for convenience receive the * `custom` object that was passed to the test adapter */ export declare function beforeAll(callback: (args: { custom: Awaited>; }) => Promise | void, customArgs?: Parameters[2]): void; /** * Run a function after all tests. * * @example * ```typescript * afterAll(({ custom }) => { * db.flush(); * }); * ``` * * @param callback - The callback to run after all tests, the callback will for convenience receive the * `custom` object that was passed to the test adapter */ export declare function afterAll(callback: (args: { custom: Awaited>; }) => Promise | void, customArgs?: Parameters[2]): void; export declare function expect(value: TValue): Expect; //# sourceMappingURL=functions.d.ts.map