/** * @since 2.0.0 */ import * as Context from "./Context.js"; import type * as DefaultServices from "./DefaultServices.js"; import * as Effect from "./Effect.js"; import type * as Fiber from "./Fiber.js"; import type * as FiberRef from "./FiberRef.js"; import type * as Layer from "./Layer.js"; import type * as Scope from "./Scope.js"; import type * as SortedSet from "./SortedSet.js"; import type * as TestAnnotation from "./TestAnnotation.js"; import * as Annotations from "./TestAnnotations.js"; import * as TestConfig from "./TestConfig.js"; import * as Live from "./TestLive.js"; import * as Sized from "./TestSized.js"; /** * @since 2.0.0 */ export type TestServices = Annotations.TestAnnotations | Live.TestLive | Sized.TestSized | TestConfig.TestConfig; /** * The default Effect test services. * * @since 2.0.0 */ export declare const liveServices: Context.Context; /** * @since 2.0.0 */ export declare const currentServices: FiberRef.FiberRef>; /** * Retrieves the `Annotations` service for this test. * * @since 2.0.0 */ export declare const annotations: () => Effect.Effect; /** * Retrieves the `Annotations` service for this test and uses it to run the * specified workflow. * * @since 2.0.0 */ export declare const annotationsWith: (f: (annotations: Annotations.TestAnnotations) => Effect.Effect) => Effect.Effect; /** * Executes the specified workflow with the specified implementation of the * annotations service. * * @since 2.0.0 */ export declare const withAnnotations: ((annotations: Annotations.TestAnnotations) => (effect: Effect.Effect) => Effect.Effect) & ((effect: Effect.Effect, annotations: Annotations.TestAnnotations) => Effect.Effect); /** * Sets the implementation of the annotations service to the specified value * and restores it to its original value when the scope is closed. * * @since 2.0.0 */ export declare const withAnnotationsScoped: (annotations: Annotations.TestAnnotations) => Effect.Effect; /** * Constructs a new `Annotations` service wrapped in a layer. * * @since 2.0.0 */ export declare const annotationsLayer: () => Layer.Layer; /** * Accesses an `Annotations` instance in the context and retrieves the * annotation of the specified type, or its default value if there is none. * * @since 2.0.0 */ export declare const get: (key: TestAnnotation.TestAnnotation) => Effect.Effect; /** * Accesses an `Annotations` instance in the context and appends the * specified annotation to the annotation map. * * @since 2.0.0 */ export declare const annotate: (key: TestAnnotation.TestAnnotation, value: A) => Effect.Effect; /** * Returns the set of all fibers in this test. * * @since 2.0.0 */ export declare const supervisedFibers: () => Effect.Effect>>; /** * Retrieves the `Live` service for this test and uses it to run the specified * workflow. * * @since 2.0.0 */ export declare const liveWith: (f: (live: Live.TestLive) => Effect.Effect) => Effect.Effect; /** * Retrieves the `Live` service for this test. * * @since 2.0.0 */ export declare const live: Effect.Effect; /** * Executes the specified workflow with the specified implementation of the * live service. * * @since 2.0.0 */ export declare const withLive: ((live: Live.TestLive) => (effect: Effect.Effect) => Effect.Effect) & ((effect: Effect.Effect, live: Live.TestLive) => Effect.Effect); /** * Sets the implementation of the live service to the specified value and * restores it to its original value when the scope is closed. * * @since 2.0.0 */ export declare const withLiveScoped: (live: Live.TestLive) => Effect.Effect; /** * Constructs a new `Live` service wrapped in a layer. * * @since 2.0.0 */ export declare const liveLayer: () => Layer.Layer; /** * Provides a workflow with the "live" default Effect services. * * @since 2.0.0 */ export declare const provideLive: (effect: Effect.Effect) => Effect.Effect; /** * Runs a transformation function with the live default Effect services while * ensuring that the workflow itself is run with the test services. * * @since 2.0.0 */ export declare const provideWithLive: ((f: (effect: Effect.Effect) => Effect.Effect) => (self: Effect.Effect) => Effect.Effect) & ((self: Effect.Effect, f: (effect: Effect.Effect) => Effect.Effect) => Effect.Effect); /** * Retrieves the `Sized` service for this test and uses it to run the * specified workflow. * * @since 2.0.0 */ export declare const sizedWith: (f: (sized: Sized.TestSized) => Effect.Effect) => Effect.Effect; /** * Retrieves the `Sized` service for this test. * * @since 2.0.0 */ export declare const sized: Effect.Effect; /** * Executes the specified workflow with the specified implementation of the * sized service. * * @since 2.0.0 */ export declare const withSized: ((sized: Sized.TestSized) => (effect: Effect.Effect) => Effect.Effect) & ((effect: Effect.Effect, sized: Sized.TestSized) => Effect.Effect); /** * Sets the implementation of the sized service to the specified value and * restores it to its original value when the scope is closed. * * @since 2.0.0 */ export declare const withSizedScoped: (sized: Sized.TestSized) => Effect.Effect; /** * @since 2.0.0 */ export declare const sizedLayer: (size: number) => Layer.Layer; /** * @since 2.0.0 */ export declare const size: Effect.Effect; /** * @since 2.0.0 */ export declare const withSize: ((size: number) => (effect: Effect.Effect) => Effect.Effect) & ((effect: Effect.Effect, size: number) => Effect.Effect); /** * Retrieves the `TestConfig` service for this test and uses it to run the * specified workflow. * * @since 2.0.0 */ export declare const testConfigWith: (f: (config: TestConfig.TestConfig) => Effect.Effect) => Effect.Effect; /** * Retrieves the `TestConfig` service for this test. * * @since 2.0.0 */ export declare const testConfig: Effect.Effect; /** * Executes the specified workflow with the specified implementation of the * config service. * * @since 2.0.0 */ export declare const withTestConfig: ((config: TestConfig.TestConfig) => (effect: Effect.Effect) => Effect.Effect) & ((effect: Effect.Effect, config: TestConfig.TestConfig) => Effect.Effect); /** * Sets the implementation of the config service to the specified value and * restores it to its original value when the scope is closed. * * @since 2.0.0 */ export declare const withTestConfigScoped: (config: TestConfig.TestConfig) => Effect.Effect; /** * Constructs a new `TestConfig` service with the specified settings. * * @since 2.0.0 */ export declare const testConfigLayer: (params: { readonly repeats: number; readonly retries: number; readonly samples: number; readonly shrinks: number; }) => Layer.Layer; /** * The number of times to repeat tests to ensure they are stable. * * @since 2.0.0 */ export declare const repeats: Effect.Effect; /** * The number of times to retry flaky tests. * * @since 2.0.0 */ export declare const retries: Effect.Effect; /** * The number of sufficient samples to check for a random variable. * * @since 2.0.0 */ export declare const samples: Effect.Effect; /** * The maximum number of shrinkings to minimize large failures. * * @since 2.0.0 */ export declare const shrinks: Effect.Effect; //# sourceMappingURL=TestServices.d.ts.map