Repository navigation
Pin the Nitro CLI test culture and add the xUnit runner schema - #10698
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved review comments were identified, and all approval-readiness assessments recommend approval.
No open issues 🎉
What changed in this PR
This pull request makes Nitro CLI tests deterministic across host cultures and standardizes xUnit runner configuration with schema references and consistent formatting.
Changes:
- Adds invariant-culture execution for Nitro CLI tests.
- Copies the Nitro xUnit configuration to the test output directory.
- Adds xUnit schema metadata and one-setting-per-line formatting to existing runner configurations.
| File | Description |
|---|---|
src/Nitro/CommandLine/test/CommandLine.Tests/xunit.runner.json |
Configures invariant culture and references the xUnit schema. |
src/Nitro/CommandLine/test/CommandLine.Tests/Nitro.CommandLine.Tests.csproj |
Copies the runner configuration to test output. |
src/Mocha/test/Mocha.Analyzers.Tests/xunit.runner.json |
Adds the xUnit schema reference. |
src/HotChocolate/Utilities/test/Utilities.Tests/xunit.runner.json |
Adds schema metadata and separates runner settings. |
src/HotChocolate/Language/test/Language.Tests/xunit.runner.json |
Adds schema metadata and separates runner settings. |
src/HotChocolate/Core/test/Validation.Tests/xunit.runner.json |
Adds schema metadata and separates runner settings. |
src/HotChocolate/Core/test/Types.Tests/xunit.runner.json |
Adds schema metadata and separates runner settings. |
src/HotChocolate/Core/test/Types.Analyzers.Tests/xunit.runner.json |
Adds the xUnit schema reference. |
src/HotChocolate/Core/test/Fetching.Tests/xunit.runner.json |
Adds the xUnit schema reference. |
src/HotChocolate/Core/test/Execution.Abstractions.Tests/xunit.runner.json |
Adds schema metadata and separates runner settings. |
src/HotChocolate/Core/test/Abstractions.Tests/xunit.runner.json |
Adds schema metadata and separates runner settings. |
src/HotChocolate/AspNetCore/test/AspNetCore.Tests/xunit.runner.json |
Adds schema metadata and separates runner settings. |
src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/xunit.runner.json |
Adds schema metadata and separates runner settings. |
Review effort: Lite
Contributor
|
✅ Nitro CLI E2E snapshots: no flow recordings changed vs |
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.
Summary
xunit.runner.json. Under a culture such asen-ZA, 12 of them failed: the filter tests formatted floats as2,5, and the help snapshots rendered the--sinceand--untildefaults as2025/12/31 …. The CLI itself keeps formatting with the user's culture.xunit.runner.jsonnow references the xUnit runner schema (https://xunit.net/schema/current/xunit.runner.schema.json) for editor completion, and lists one setting per line.Test plan
LANG=en_ZA.UTF-8, the 12 Nitro CLI tests fail without the runner config and pass with it, on net8.0, net9.0, net10.0, and net11.0.Nitro.CommandLine.Testssuite passes on net10.0 withLANG=en_ZA.UTF-8.xunit.runner.jsonparses as JSON.