import * as plugins from './tapbundle.plugins.js'; import { TapTest } from './tapbundle.classes.taptest.js'; export interface IPromiseFunc { (): Promise; } export declare class SkipError extends Error { constructor(message: string); } export declare class TapTools { /** * the referenced TapTest */ private _tapTest; private _retries; private _retryCount; testData: any; private static _sharedContext; private _snapshotPath; private static _pathHelpers; static setPathHelpers(helpers: typeof TapTools._pathHelpers): void; constructor(TapTestArg: TapTest); /** * allow failure */ allowFailure(): void; /** * skip the rest of the test */ skip(reason?: string): never; /** * conditionally skip the rest of the test */ skipIf(condition: boolean, reason?: string): void; /** * mark test as todo */ todo(reason?: string): void; /** * set the number of retries for this test */ retry(count: number): void; /** * get the current retry count */ get retryCount(): number; /** * internal: increment retry count */ _incrementRetryCount(): void; /** * get the maximum retries */ get maxRetries(): number; /** * async/await delay method */ delayFor(timeMilliArg: number): Promise; delayForRandom(timeMilliMinArg: number, timeMilliMaxArg: number): Promise; coloredString(...args: Parameters): Promise; /** * set a timeout for the test */ timeout(timeMilliArg: number): void; /** * wait for a timeout (used internally) */ waitForTimeout(timeMilliArg: number): Promise; returnError(throwingFuncArg: IPromiseFunc): Promise; defer(): plugins.smartpromise.Deferred; cumulativeDefer(): plugins.smartpromise.CumulativeDeferred; smartjson: typeof plugins.smartjson; /** * shared context for data sharing between tests */ context: { get: (key: string) => any; set: (key: string, value: any) => void; delete: (key: string) => boolean; clear: () => void; }; /** * Snapshot testing - compares output with saved snapshot */ matchSnapshot(value: any, snapshotName?: string): Promise; /** * Test fixtures - create test data instances */ private static _fixtureData; private static _fixtureFactories; /** * Define a fixture factory */ static defineFixture(name: string, factory: (data?: Partial) => T | Promise): void; /** * Create a fixture instance */ fixture(name: string, data?: Partial): Promise; /** * Factory pattern for creating multiple fixtures */ factory(name: string): { create: (data?: Partial) => Promise; createMany: (count: number, dataOverrides?: Partial[] | ((index: number) => Partial)) => Promise; }; /** * Clear all fixtures (typically called in afterEach) */ static cleanupFixtures(): Promise; }