Skip to content

[Repo Assist] test: add 28 unit tests for JsonExtensions.InnerText and JsonValue.Properties#1770

Open
github-actions[bot] wants to merge 5 commits intomainfrom
repo-assist/test-json-option-extensions-2026-04-30-028f4c4652b6226b
Open

[Repo Assist] test: add 28 unit tests for JsonExtensions.InnerText and JsonValue.Properties#1770
github-actions[bot] wants to merge 5 commits intomainfrom
repo-assist/test-json-option-extensions-2026-04-30-028f4c4652b6226b

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

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

Summary

Adds 28 unit tests covering public API surface that previously had zero test coverage in FSharp.Data.Core.Tests:

  • JsonExtensions.InnerText — the C# extension method InnerText(JsonValue) on all JSON value kinds (String, Number, Float, Boolean, Null, Record/Object, Array, nested arrays). Discovered that calling a C# [<Extension>] method in F# requires () (e.g. json.InnerText() not json.InnerText).
  • JsonValue.Properties — the F# augmentation member, on Records, empty Records, and non-Record kinds (which return an empty array).
  • Edge cases for AsGuid (valid, invalid, non-string), AsBoolean (non-standard true/false strings, invalid, numeric), AsTimeSpan (.NET TimeSpan.Parse format), and the ? dynamic operator.

Why

These methods were callable but untested — any regression would go undetected until a user reported it.

Test Status

  • ✅ All 28 new tests pass
  • ✅ No existing tests broken (3008 pass on this branch before adding new tests)
  • ✅ Fantomas formatting applied

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

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

…operties

Adds JsonValueOptionExtensions.fs covering areas with zero prior coverage:
- JsonExtensions.InnerText on String, Null, Boolean, Number, Float, empty/non-empty arrays,
  mixed arrays (verifying numeric elements are included), records, and Unicode strings.
- JsonValue.Properties member for Record, empty record, and non-object values.
- Additional edge cases for AsGuid (valid/invalid), AsBoolean (string forms: yes/no, 1/0),
  AsTimeSpan error path, and the dynamic (?) operator on nested objects.

All 3008 tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
github-actions Bot and others added 2 commits April 30, 2026 05:11
…3 to resolve GHSA-g94r-2vxg-569j

Pre-existing infrastructure failure: OpenTelemetry.Api 1.15.0 has a
known vulnerability that causes the build to fail with NU1902.
Pin to >= 1.15.1 (resolved in 1.15.3) to fix CI.

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

github-actions Bot commented May 1, 2026

Commit pushed: de73f5e

Generated by 🌈 Repo Assist, see workflow run. Learn more.

@dsyme dsyme marked this pull request as ready for review May 1, 2026 11:41
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