Skip to content

[Repo Assist] test: add coverage for untested List and Array module functions#245

Merged
gdziadkiewicz merged 3 commits intomasterfrom
repo-assist/test-list-array-coverage-2026-03-12-e393f6b997112caa
Mar 15, 2026
Merged

[Repo Assist] test: add coverage for untested List and Array module functions#245
gdziadkiewicz merged 3 commits intomasterfrom
repo-assist/test-list-array-coverage-2026-03-12-e393f6b997112caa

Conversation

@github-actions
Copy link
Contributor

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

Summary

Adds 33 new unit tests covering public functions in the List and Array modules (in Collections.fs) that had zero test coverage before this PR.

List module — new tests

Function Tests added
singleton 1
cons 1
findExactlyOne 3 (ok, no match, multiple matches)
skip / take 2 each (basic + boundary)
skipWhile / skipUntil 1 each
takeWhile / takeUntil 1 each
groupNeighboursBy 2 (non-empty, empty)
mapIf 1
catOptions 2
choice1s / choice2s 1 each
partitionChoices 1
equalsWith 3

Array module — new tests

Function Tests added
nth 1
setAt 1
findExactlyOne 2
centralMovingAverageOfOption 2
catOptions 1
choice1s / choice2s 1 each
partitionChoices 1
equalsWith 3

Test Status

✅ All 743 tests pass (dotnet testPassed: 743, Skipped: 6, Failed: 0). The 6 skipped tests are pre-existing.

Up from ~710 before the recent test addition PRs. This PR adds 33 new passing tests.

Generated by Repo Assist ·

To install this agentic workflow, run

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

Add 33 new tests covering functions in List and Array that had no
test coverage:

List: singleton, cons, findExactlyOne, skip, take, skipWhile,
skipUntil, takeWhile, takeUntil, groupNeighboursBy, mapIf,
catOptions, choice1s, choice2s, partitionChoices, equalsWith

Array: nth, setAt, findExactlyOne, centralMovingAverageOfOption,
catOptions, choice1s, choice2s, partitionChoices, equalsWith

Total test count increases from ~710 to 743.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds unit test coverage for previously untested public functions in the FSharpx.Collections List and Array extension modules (implemented in src/FSharpx.Collections/Collections.fs), increasing confidence in their baseline behavior.

Changes:

  • Add new List extension tests (e.g., singleton, cons, findExactlyOne, skip/take, groupNeighboursBy, equalsWith).
  • Add new Array extension tests (e.g., nth, setAt, findExactlyOne, centralMovingAverageOfOption, equalsWith).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
tests/FSharpx.Collections.Tests/ListExtensionsTest.fs Adds unit tests covering multiple FSharpx.Collections.List public helpers.
tests/FSharpx.Collections.Tests/ArrayTests.fs Adds unit tests covering multiple FSharpx.Collections.Array public helpers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds unit-test coverage for previously untested public functions in FSharpx.CollectionsList and Array extension modules (implemented in Collections.fs), increasing confidence in their behavior without changing production code.

Changes:

  • Added unit tests for List helpers (e.g., singleton, cons, findExactlyOne, skip/take, predicate-based take/skip, groupNeighboursBy, mapIf, option/choice helpers, equalsWith).
  • Added unit tests for Array helpers (e.g., nth, setAt, findExactlyOne, centralMovingAverageOfOption, option/choice helpers, equalsWith).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/FSharpx.Collections.Tests/ListExtensionsTest.fs Adds coverage for additional FSharpx.Collections.List extension functions.
tests/FSharpx.Collections.Tests/ArrayTests.fs Adds coverage for additional FSharpx.Collections.Array extension functions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@gdziadkiewicz gdziadkiewicz marked this pull request as ready for review March 15, 2026 17:40
@gdziadkiewicz gdziadkiewicz merged commit 16f1207 into master Mar 15, 2026
8 checks 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.

2 participants