Skip to content

[repo-assist] Add test coverage for tryFirst, firstOrDefault, zipWithParallel, combineLatestWithAsync, toObservable - #339

Merged
dsyme merged 2 commits into
mainfrom
repo-assist/test-tryfirst-zipwithparallel-toobservable-20260825-0b32ddcb446a262d
Aug 25, 2026
Merged

[repo-assist] Add test coverage for tryFirst, firstOrDefault, zipWithParallel, combineLatestWithAsync, toObservable#339
dsyme merged 2 commits into
mainfrom
repo-assist/test-tryfirst-zipwithparallel-toobservable-20260825-0b32ddcb446a262d

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Summary

During routine coverage review, I identified several public AsyncSeq API functions with no existing test coverage: tryFirst, firstOrDefault, zipWithParallel, combineLatestWithAsync, and toObservable. 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 minimal IObserver test double.

Trade-offs

  • The toObservable tests use a ManualResetEventSlim with 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 Release486/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 on main.

As always, please review before merging — happy to adjust test style or add further edge cases if useful!

Generated by 🌈 Repo Assist, see workflow run. Learn more.
Comment /repo-assist to run again

Add this agentic workflow to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@ae8d551f07c7ed7619f8c58c7bb4c3ac89395d38

…ineLatestWithAsync, toObservable

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dsyme
dsyme marked this pull request as ready for review August 25, 2026 21:06
@dsyme
dsyme merged commit 9536a18 into main Aug 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant