cancelAndIgnoreRemainingEvents

abstract fun cancelAndIgnoreRemainingEvents(): Nothing

Cancel collecting events from the source Flow and ignore any events which have already been received. Calling this function will exit the test block.