recordPulses method

PulseRecorder<Cell> recordPulses(
  1. Symbol id
)

Records pulses from the cell registered at id.

The recorder is tracked by the harness and auto-stopped on dispose. If you call recorder.stop() early, the harness's dispose remains safe (stop is idempotent).

Parameters:

  • id: The Registration Key.

Returns:

A live PulseRecorder over the registered cell. The recorder is already subscribed and recording.

Throws:

See Also:

Implementation

PulseRecorder<Cell> recordPulses(Symbol id) {
  if (_disposed) {
    throw StateError('CellTestHarness: recordPulses called after dispose.');
  }
  final c = _cells[id];
  if (c == null) {
    throw StateError('CellTestHarness: no cell registered at $id.');
  }
  final recorder = c.recordPulses();
  _recorders.add(recorder);
  return recorder;
}