[Repo Assist] test: add 28 unit tests for JsonExtensions.InnerText and JsonValue.Properties#1770
Open
github-actions[bot] wants to merge 5 commits intomainfrom
Conversation
…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>
…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>
Contributor
Author
|
Commit pushed:
|
13 tasks
…-04-30-028f4c4652b6226b
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
Adds 28 unit tests covering public API surface that previously had zero test coverage in
FSharp.Data.Core.Tests:JsonExtensions.InnerText— the C# extension methodInnerText(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()notjson.InnerText).JsonValue.Properties— the F# augmentation member, on Records, empty Records, and non-Record kinds (which return an empty array).AsGuid(valid, invalid, non-string),AsBoolean(non-standard true/false strings, invalid, numeric),AsTimeSpan(.NETTimeSpan.Parseformat), and the?dynamic operator.Why
These methods were callable but untested — any regression would go undetected until a user reported it.
Test Status