Skip to content

Function: collectLogs()

@termwright/test


@termwright/test / 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.

LogSource

LogCollection = ...

object

the collection and an unsubscribe function.

readonly collection: LogCollection

dispose(): void

void