jest-metadata
Version:
🦸♂️ Superhero power for your Jest reporters! 🦸♀️
40 lines (39 loc) • 2.38 kB
TypeScript
import type { AggregatedIdentifier } from '../ids';
import * as symbols from '../symbols';
import type { HookType } from '../types';
import { BaseMetadata } from './BaseMetadata';
import type { HookDefinitionMetadata } from './HookDefinitionMetadata';
import type { HookInvocationMetadata } from './HookInvocationMetadata';
import type { MetadataContext } from './MetadataContext';
import type { TestEntryMetadata } from './TestEntryMetadata';
import type { TestFileMetadata } from './TestFileMetadata';
import type { TestFnInvocationMetadata } from './TestFnInvocationMetadata';
import type { TestInvocationMetadata } from './TestInvocationMetadata';
type DefinitionMetadata = DescribeBlockMetadata | TestEntryMetadata | HookDefinitionMetadata;
type ExecutionMetadata = DescribeBlockMetadata | TestInvocationMetadata | HookInvocationMetadata<DescribeBlockMetadata>;
export declare class DescribeBlockMetadata extends BaseMetadata {
#private;
readonly file: TestFileMetadata;
readonly parent?: DescribeBlockMetadata;
readonly children: DefinitionMetadata[];
readonly executions: ExecutionMetadata[];
constructor(context: MetadataContext, parent: TestFileMetadata | DescribeBlockMetadata, id: AggregatedIdentifier);
[symbols.addDescribeBlock](id: AggregatedIdentifier): DescribeBlockMetadata;
[symbols.addTestEntry](id: AggregatedIdentifier): TestEntryMetadata;
[symbols.addHookDefinition](id: AggregatedIdentifier, hookType: HookType): HookDefinitionMetadata;
[symbols.pushExecution](metadata: ExecutionMetadata): void;
[symbols.pushBeforeAll](testInvocation: TestInvocationMetadata): void;
[symbols.pushAfterAll](invocations: HookInvocationMetadata<DescribeBlockMetadata>[]): void;
[symbols.start](): void;
[symbols.finish](): void;
ancestors(): IterableIterator<DescribeBlockMetadata>;
allAncestors(): IterableIterator<BaseMetadata>;
describeBlocks(): IterableIterator<DescribeBlockMetadata>;
testEntries(): IterableIterator<TestEntryMetadata>;
hookDefinitions(): IterableIterator<HookDefinitionMetadata>;
allDescribeBlocks(): IterableIterator<DescribeBlockMetadata>;
allTestEntries(): IterableIterator<TestEntryMetadata>;
allInvocations(): IterableIterator<HookInvocationMetadata | TestFnInvocationMetadata>;
allTestInvocations(): IterableIterator<TestInvocationMetadata>;
}
export {};