Function: collectLogs()
@termwright/test / collectLogs
Function: collectLogs()
Section titled “Function: collectLogs()”collectLogs(
harness,into?):object
Defined in: test/src/logs.ts:181
Subscribes to a session’s logs.
The fixtures call this for every session they launch. Call it yourself for a
harness they did not create — a mountInk component, say — and
expect(harness).toHaveLogged(…) starts working on it too.
Parameters
Section titled “Parameters”harness
Section titled “harness”LogCollection = ...
Returns
Section titled “Returns”object
the collection and an unsubscribe function.
collection
Section titled “collection”
readonlycollection:LogCollection
dispose()
Section titled “dispose()”dispose():
void
Returns
Section titled “Returns”void