[repo-assist] Add test coverage for tryFirst, firstOrDefault, zipWithParallel, combineLatestWithAsync, toObservable - #339
Merged
dsyme merged 2 commits intoAug 25, 2026
Conversation
…ineLatestWithAsync, toObservable Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dsyme
marked this pull request as ready for review
August 25, 2026 21:06
…observable-20260825-0b32ddcb446a262d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Summary
During routine coverage review, I identified several public
AsyncSeqAPI functions with no existing test coverage:tryFirst,firstOrDefault,zipWithParallel,combineLatestWithAsync, andtoObservable. This PR adds tests for each, covering both typical and edge-case (empty sequence) behavior. No production code was changed.What was added
tryFirst: Some/None for non-empty/empty sequences.firstOrDefault: default value vs. first element.zipWithParallel: combining two sequences, and stopping at the shorter one.combineLatestWithAsync: combine-latest semantics (seed + subsequent updates) and empty-source short-circuiting.toObservable: verifying OnNext/OnCompleted delivery for both non-empty and empty sequences via a minimalIObservertest double.Trade-offs
toObservabletests use aManualResetEventSlimwith a timeout to wait for async completion since the observable bridges to a background async computation; this is consistent with how async-to-sync bridging is tested elsewhere but does add a small amount of wall-clock time to the test run.Test Status
✅
dotnet test -c Release— 486/486 tests passed (476 pre-existing + 10 new), 0 failures. Pre-existing NU1605 (package downgrade) and FS9999 (groupBy consumption) warnings are unrelated to this change and present onmain.As always, please review before merging — happy to adjust test style or add further edge cases if useful!
Add this agentic workflow to your repo
To install this agentic workflow, run