Stratal API Reference
    Preparing search index...
    Index

    Constructors

    • Parameters

      • app: Application
      • env: StratalEnv
      • ctx: StratalExecutionContext
      • isolatedDatabase: IsolatedDatabase | null = null
      • testEmailProvider: TestEmailProvider | null = null

      Returns TestingModule

    Accessors

    • get featureFlags(): FakeFeatureFlagService

      Get the fake feature-flag service to configure flags in tests (e.g. module.featureFlags.set('my-flag', true)).

      Returns FakeFeatureFlagService

    • get sentEmails(): ResolvedEmailMessage[]

      Emails recorded by the default TestEmailProvider, in send order. Empty when the email provider factory was overridden.

      Returns ResolvedEmailMessage[]

    Methods

    • Assert the number of records in a table

      Parameters

      • table: string
      • expected: number
      • Optionalname: string

      Returns Promise<void>

    • Assert that a record exists in the database

      Parameters

      • table: string
      • data: Record<string, unknown>
      • Optionalname: string

      Returns Promise<void>

    • Assert that a record does not exist in the database

      Parameters

      • table: string
      • data: Record<string, unknown>
      • Optionalname: string

      Returns Promise<void>

    • Run callback in request scope (for DB operations, service access)

      Type Parameters

      • T

      Parameters

      • callback: (container: Container) => T | Promise<T>

      Returns Promise<T>