import { BenchmarkOpts } from "../types.js"; import { BenchmarkRunOptsWithFn } from "./runBenchFn.js"; type PartialBy = Omit & Partial>; interface ItBenchFn { (opts: BenchmarkRunOptsWithFn): void; (idOrOpts: string | Omit, "fn">, fn: (arg: T) => void): void; (idOrOpts: string | PartialBy, "fn">, fn?: (arg: T) => void | Promise): void; } interface ItBench extends ItBenchFn { only: ItBenchFn; skip: ItBenchFn; } export declare const itBench: ItBench; /** * Customize benchmark opts for a describe block. Affects only tests within that Mocha.Suite * ```ts * describe("suite A1", function () { * setBenchOpts({runs: 100}); * // 100 runs * itBench("bench A1.1", function() {}); * itBench("bench A1.2", function() {}); * // 300 runs * itBench({id: "bench A1.3", runs: 300}, function() {}); * * // Supports nesting, child has priority over parent. * // Arrow functions can be used, won't break it. * describe("suite A2", () => { * setBenchOpts({runs: 200}); * // 200 runs. * itBench("bench A2.1", () => {}); * }) * }) * ``` */ export declare function setBenchOpts(opts: BenchmarkOpts): void; export {}; //# sourceMappingURL=index.d.ts.map