server-core/test-utils
packages/server/src/test-utils
Purpose
Shared server-core test utility exports.Public surface
AwaitNotificationError
TypeAlias
awaitOneNotification
Function
client.subscribe(def) via
Stream.runHead, failing with AwaitNotificationTimeoutError on timeout
and AwaitNotificationClosedError when the transport closed before a
matching frame arrived. Distinguishing close from timeout keeps a dead
connection from masquerading as a missing notification.
Returns: The await one notification result.
closeAllClients
Function
ConnectedAgent
Interface
connectTestClient
Function
CoreSchemaSqlLoadError
TypeAlias
CoreTestDatabasePort
Interface
CoreTestReadyOutcome
TypeAlias
CoreTestRuntimeServerHandle
Interface
CoreTestServer
TypeAlias
CoreTestServerHandle
Interface
CoreTestServerPort
Interface
CoreTestSpan
Interface
CoreTestSpanExporterPort
Interface
createTestAgent
Function
DEFAULT_TEST_ADMIN_USER_ID
Variable
getBaseUrl
Function
getCoreDb
Function
getWsUrl
Function
loadCoreSchemaSql
Function
makePgliteHarness
Function
PGLITE_HOOK_TIMEOUT_MS
Variable
PgliteHarness
Interface
PgliteHarnessError
TypeAlias
postJson
Function
body as JSON to ${baseUrl}${path} and resolve with
{status, json}. HTTP integration tests import this helper to avoid
repeated request/JSON boilerplate.
Returns: The post json result.
registerAgent
Function
registerAndConnect
Function
resetCoreTestDb
Function
setupAgentGroup
Function
setupAgentPair
Function
startCoreTestServer
Function
startCoreTestServerEffect
Variable
startCoreTestServerFull
Function
StartCoreTestServerOptions
Interface
stopCoreTestServer
Function
trackClient
Function
Files
core-schema-sql.tshelpers.tsindex.tspglite-harness.tsports.tsserver.ts