Classes
@system-inc/base-foundation · 515c140 · 2 symbols
Integration test client for interacting with the server under test.
Generic transport plumbing only — cookies, GraphQL/RPC/WebSocket client construction, and a bare data source factory. Module-specific helpers (e.g. account setup, device cookie management) live with the modules that own them and wrap an instance of this class.
Members
runtime:IntegrationTestEnvironmentclearAllCookies():voidgetCookies():Record<string, string>getCookieString():stringgetGqlClient():GraphQLClientgetOrmDatabase(entities:OrmEntityClass[],name:string):OrmDatabaseCreates an OrmDatabase against the configured test database for direct DB assertions on Orm entities.
getRemoteProcedureClient():RpcClient<RpcInterface>getServerBaseUrl():stringgetWebSocket():WebSocketremoveCookie(name:string):voidsendRequest(url:string,requestInit?:RequestInit):Promise<Response>setCookie(name:string,value:string):voidsetCookies(cookies:Record<string, string>):voidtestGqlUrl():stringtestRpcUrl():string
Environment to facilitate integration testing.
Members
environment:Environmentmode:ExecutionModeplatform:Platformclient:IntegrationTestClienthost:stringtestEnvironmentVariables:IntegrationTestEnvironmentVariablesworker:string | undefinedgetDatabaseUrl(name:string):string | undefinedgetEnvironmentVariables():IntegrationTestEnvironmentVariables & Tstatic get():IntegrationTestEnvironment