jest-metadata
Version:
🦸♂️ Superhero power for your Jest reporters! 🦸♀️
48 lines (47 loc) • 2.46 kB
TypeScript
export type { Metadata, GlobalMetadata, TestFileMetadata, DescribeBlockMetadata, HookDefinitionMetadata, TestEntryMetadata, HookInvocationMetadata, TestInvocationMetadata, TestFnInvocationMetadata, } from './metadata';
/**
* Aggregated metadata (global state).
* Works as intended only in the main process.
* Child processes will have their own state, limited to their own tests
*/
export declare const state: import("./metadata").GlobalMetadata;
/**
* Current metadata of a test block that is being added or executed.
*/
export declare const metadata: import("./metadata").BaseMetadata;
/**
* Pseudo-annotation that allows to associate metadata with a test block.
* It is not an ECMAScript decorator, but it behaves similarly.
* Use it to set a single metadata value.
*/
export declare const $Set: (path: string | readonly string[], value: unknown) => void;
/**
* Pseudo-annotation that allows to associate metadata with a test block.
* It is not an ECMAScript decorator, but it behaves similarly.
* Use it to push a value to an array in metadata.
*/
export declare const $Push: (path: string | readonly string[], ...values: unknown[]) => void;
/**
* Pseudo-annotation that allows to associate metadata with a test block.
* It is not an ECMAScript decorator, but it behaves similarly.
* Use it to prepend a value to an array in metadata.
*/
export declare const $Unshift: (path: string | readonly string[], ...values: unknown[]) => void;
/**
* Pseudo-annotation that allows to associate metadata with a test block.
* It is not an ECMAScript decorator, but it behaves similarly.
* Use it to assign multiple values to an object in metadata.
*/
export declare const $Assign: (path: string | readonly string[] | undefined, value: import("./metadata").Data) => void;
/**
* Pseudo-annotation that allows to associate metadata with a test block.
* It is not an ECMAScript decorator, but it behaves similarly.
* Use it to ensure multiple placeholder values to an object in metadata.
*/
export declare const $Defaults: (path: string | readonly string[] | undefined, value: import("./metadata").Data) => void;
/**
* Pseudo-annotation that allows to associate metadata with a test block.
* It is not an ECMAScript decorator, but it behaves similarly.
* Use it to deeply merge multiple values to an object in metadata.
*/
export declare const $Merge: (path: string | readonly string[] | undefined, value: import("./metadata").Data) => void;