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