Repository navigation
docs: restructure README as a progressive tutorial - #7
Merged
Merged
Conversation
The README now grows one cart example by one construct per step (first scenario, reusable steps, Background and Before, Rule, Outline, tags, Skip and Pending, Parallel), followed by a reference section. The declaration order is shown as a commented code skeleton instead of the grammar notation. The signature block is replaced by a pointer to go doc. The migration section is unchanged.
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.
What changes
The README becomes a tutorial that grows one cart example by one construct per step, followed by a reference section:
And/But,Compose)BackgroundandBeforeRuleOutlineReference: declaration order, chains, setup and lifecycle, failure output, names and tags. The migration section and the architecture link are unchanged.
Documentation only; no Go file changes.
Why
The previous README opened with one example and then went straight to a signature block and rules. A reader had no path from the first scenario to the other constructs.
Decisions a reviewer may question
*/+/[ ]grammar notation and not a Mermaid diagram. The order is linear, so a diagram adds little, and Mermaid renders only on GitHub. The package doc keeps the compact notation.go doc github.com/jacoelho/bdd; the block duplicated the signatures.priceRow, JSON) became one sentence in step 2.Verification
Run locally on Go 1.27.3, darwin/arm64:
gofmt -l,go vetandgo test.go test -runselectors in step 6 select what the text says;go doc github.com/jacoelho/bddworks.Not compiled: six fragments (the "declare on
r, notf" snippet and the five migration before/after snippets).Limitation
Line numbers in the output listings (
cart_test.go:33,:167) match only when the blocks are pasted in order.