import type { Cause } from "../../Cause/index.js"; import * as T from "../../Effect/index.js"; import type { Has } from "../../Has/index.js"; import type { Layer } from "../../Layer/index.js"; import type { Managed } from "../../Managed/index.js"; import * as M from "../../Managed/index.js"; import * as O from "../../Option/index.js"; import * as Annotations from "../Annotations/index.js"; import type { TestAnnotation } from "../TestAnnotation/index.js"; import * as TAM from "../TestAnnotationMap/index.js"; import type { TestFailure } from "../TestFailure/index.js"; import type { TestSuccess } from "../TestSuccess/index.js"; export declare const SpecCaseTypeId: unique symbol; export declare type SpecCaseTypeId = typeof SpecCaseTypeId; export declare abstract class SpecCase { readonly [SpecCaseTypeId]: SpecCaseTypeId; readonly [T._R]: (_: R) => void; readonly [T._E]: () => E; readonly [T._T]: () => T; readonly [T._A]: () => A; map(f: (a: A) => B): SpecCase; } export declare function concreteSpecCase(_: SpecCase): asserts _ is SuiteCase | TestCase; export declare class SuiteCase extends SpecCase { readonly label: string; readonly specs: M.Managed; readonly exec: O.Option; readonly _tag = "SuiteCase"; constructor(label: string, specs: M.Managed, exec: O.Option); } export declare class TestCase extends SpecCase { readonly label: string; readonly test: T.Effect; readonly annotations: TAM.TestAnnotationMap; readonly _tag = "TestCase"; constructor(label: string, test: T.Effect, annotations: TAM.TestAnnotationMap); } export declare const SpecTypeId: unique symbol; export declare type SpecTypeId = typeof SpecTypeId; /** * A `Spec[R, E, T]` is the backbone of _ZIO Test_. Every spec is either a * suite, which contains other specs, or a test of type `T`. All specs require * an environment of type `R` and may potentially fail with an error of type * `E`. */ export declare class Spec { readonly caseValue: SpecCase>; readonly [SpecTypeId]: SpecTypeId; readonly [T._R]: (_: R) => void; readonly [T._E]: () => E; readonly [T._T]: () => T; constructor(caseValue: SpecCase>); } export declare function suite(label: string, specs: M.Managed[]>, exec: O.Option): Spec; export declare function test(label: string, test: T.Effect, annotations: TAM.TestAnnotationMap): Spec; export declare type ZSpec = Spec, TestSuccess>; /** * Transforms the spec one layer at a time. */ export declare function transform(f: (_: SpecCase>) => SpecCase>): (spec: Spec) => Spec; /** * Annotates each test in this spec with the specified test annotation. */ export declare function annotate(key: TestAnnotation, value: V): (self: Spec) => Spec; /** * Returns a new spec with the annotation map at each node. */ export declare function annotated(self: Spec): Spec, Annotations.Annotated, Annotations.Annotated>; export declare function provideLayer(layer: Layer): (self: Spec) => Spec; export declare function forEachExec(defExec: T.ExecutionStrategy, failure: (_: Cause) => T.Effect, success: (_: T) => T.Effect): (self: Spec) => Managed>; export declare function foldM(defExec: T.ExecutionStrategy): (f: (_: SpecCase) => M.Managed) => (self: Spec) => Managed; //# sourceMappingURL=index.d.ts.map