test: Split Tests.fs into Shared / Tests / PrimitiveTests#300
Open
dimension-zero wants to merge 1 commit into
Open
test: Split Tests.fs into Shared / Tests / PrimitiveTests#300dimension-zero wants to merge 1 commit into
dimension-zero wants to merge 1 commit into
Conversation
Tests.fs was a single 1115-line file containing two unrelated modules plus a wodge of base DU types and a shared parser instance. Break it into: - `Shared.fs` — top-level `Argu.Tests.Shared` module with the base union types (`Argument`, `PushArgs`, …) and the cached `parser` instance plus `parseFunc` helper. - `Tests.fs` — `Argu Tests Main List`, now ~800 lines, opens `Argu.Tests.Shared` instead of declaring the schema inline. - `PrimitiveTests.fs` — the previously co-located `Argu Tests Main Primitive` module, including its self-contained `ArgumentPrimitive` schema. This is the first navigation pass; deeper splits by feature area (subcommands, AppSettings, custom assignment, …) can land on top of this without touching the schema again.
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
tests/Argu.Tests/Tests.fswas a single 1115-line file containing two unrelated test modules and a wodge of shared DU types. Break it into:Shared.fs—Argu.Tests.Sharedmodule with the base union types (Argument,PushArgs,CheckoutArgs, …) plus the cachedparserinstance andparseFunchelper.Tests.fs—Argu Tests Main List, now ~800 lines, opensArgu.Tests.Sharedinstead of declaring the schema inline.PrimitiveTests.fs— the previously co-locatedArgu Tests Main Primitivemodule, including its self-containedArgumentPrimitiveschema.Why
The original critique called out one-file 1100-line test modules as a navigation problem. This is the first split pass: schema in one place, the two existing modules cleanly separated. Deeper splits by feature area (subcommands, AppSettings, custom assignment, …) can land on top of this without touching the schema again.
Test plan
dotnet build -c Release— cleandotnet test -c Release— 112/112 pass (unchanged)