TestAdapter
Defined in: src/adapters/testing.ts:9
A GatewayAdapter implementation for unit testing.
Provides a waitUntil implementation that collects background promises,
allowing tests to await adapter.waitAll() before finishing.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TestAdapter():
TestAdapter
Returns
Section titled “Returns”TestAdapter
Methods
Section titled “Methods”reset()
Section titled “reset()”reset():
void
Defined in: src/adapters/testing.ts:33
Reset the collected promises.
Returns
Section titled “Returns”void
waitAll()
Section titled “waitAll()”waitAll():
Promise<void>
Defined in: src/adapters/testing.ts:22
Await all pending background work collected via waitUntil.
Returns
Section titled “Returns”Promise<void>
waitUntil()
Section titled “waitUntil()”waitUntil(
promise):void
Defined in: src/adapters/testing.ts:15
Add a promise to the background work queue.
Parameters
Section titled “Parameters”promise
Section titled “promise”Promise<unknown>
Returns
Section titled “Returns”void