UNPKG

intern

Version:

Intern. A next-generation code testing stack for JavaScript.

22 lines (21 loc) 1.2 kB
import { Executor } from '../executors/Executor'; import BenchmarkTest, { BenchmarkDeferredTestFunction, BenchmarkTestFunction } from '../BenchmarkTest'; import { BenchmarkSuiteProperties } from '../BenchmarkSuite'; export default function registerSuite(name: string, descriptorOrFactory: BenchmarkSuiteDescriptor | BenchmarkSuiteFactory | BenchmarkTests): void; export declare function getInterface(executor: Executor): { registerSuite(name: string, descriptorOrFactory: BenchmarkSuiteDescriptor | BenchmarkSuiteFactory | BenchmarkTests): void; async: typeof BenchmarkTest.async; }; export interface BenchmarkInterface { registerSuite(name: string, descriptor: BenchmarkSuiteDescriptor | BenchmarkSuiteFactory | BenchmarkTests): void; async: (testFunction: BenchmarkDeferredTestFunction, numCallsUntilResolution?: number) => BenchmarkTestFunction; } export interface BenchmarkTests { [name: string]: BenchmarkSuiteDescriptor | BenchmarkTestFunction | BenchmarkTests; } export interface BenchmarkSuiteDescriptor extends Partial<BenchmarkSuiteProperties> { tests: BenchmarkTests; } export interface BenchmarkSuiteFactory { (): BenchmarkSuiteDescriptor | BenchmarkTests; }