Skip to main content Link Search Menu Expand Document (external link)

TestLayers overview

Test Helper Layers

Provides mock service layers for testing HTTP client functions. These layers provide no-op implementations of services to satisfy layer dependencies without actual retry or caching behavior.

Added in v0.0.1


Table of contents


utils

MockCacheServiceLive

Mock CacheService that passes through requests without caching

Signature

export declare const MockCacheServiceLive: Layer.Layer<CacheService, never, never>

Added in v0.0.1

MockCredentialServiceLive

Mock CredentialService that returns test credentials

Signature

export declare const MockCredentialServiceLive: Layer.Layer<CredentialService, never, never>

Added in v0.0.3

MockOAuthServiceLive

Mock OAuthService that returns a test access token

Signature

export declare const MockOAuthServiceLive: Layer.Layer<OAuthService, never, never>

Added in v0.0.3

MockRetryServiceLive

Mock RetryService that passes through requests without retry logic

Signature

export declare const MockRetryServiceLive: Layer.Layer<RetryService, never, never>

Added in v0.0.1

MockServicesLive

Combined mock services layer for testing

Signature

export declare const MockServicesLive: Layer.Layer<
  OAuthService | CredentialService | CacheService | RetryService,
  never,
  never
>

Added in v0.0.1