docs: v6 audit — fix code errors, typos, and stale content#386
Merged
Conversation
Audit pass over the v6 (preview) documentation:
- modules.mdx: fix invalid `Should Be` -> `Should -Be` in two examples
- setup-and-teardown.mdx: make BeforeEach use $file (matched It/AfterEach
blocks and surrounding prose, which all referenced $file); replace the
'xxx' placeholder path in sample output
- data-driven-tests.mdx: remove stray empty '####' heading; fix two
incomplete sentences
- test-file-structure.mdx, file-placement-and-naming.mdx: fix garbled
sentences ("when using Data driven tests", "import files into tests")
- result-object.mdx: align parallel-runner requirement to PowerShell 7.4+
- test-results.mdx: reference the real TestResult.* config properties
- testdrive.mdx, modules.mdx: its/it's and subject-verb grammar fixes
- assertions (should-command, custom-assertions): typos and an output
sample whose Describe name didn't match the code
- migrations (v3-to-v4, v4-to-v5, breaking-changes-in-v5): typo fixes
- additional-resources/misc.mdx: remove the leftover '## TBD' draft section
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- correct the page meta description ("the way you structure")
- "Generating tests and blocks" / "to generate tests"
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace stale v5-framing console output across the v6 docs with output captured from a real Pester 6.0.0-rc2 run: - Drop the old discovery framing (Starting discovery / Discovery found / Test discovery finished / Running tests.) in favor of the single "Running tests from N files." banner. - Remove the per-test "(framework|user)" timing breakdown that v6 no longer prints. - Update summary lines to the v6 format (Passed/Failed/Skipped/Inconclusive/NotRun, no Total). - Show the single "at <assertion>, <path>:line" location for Should failures and the new "^" string-diff caret. - Prefer Windows-style paths to match existing examples. Also remove the "Work in progress" banner from the Should page. Affected: quick-start, skip, tags, data-driven-tests, setup-and-teardown, configuration, code-coverage, output, should-command, custom-assertions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- custom-assertions: Pester 6.0.0-rc2 ships 26 built-in Should operators (verified with Get-ShouldOperator), not 25. - discovery-and-run: describe the two-phase model as powering Pester's features generally, rather than anchoring it to Pester 5, since these are the v6 docs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9391c9f to
c2afcf0
Compare
fflaten
reviewed
Jul 1, 2026
Comment on lines
+57
to
+65
| Filter 'Tag' set to ('Acceptance'). | ||
| Filter 'ExcludeTag' set to ('Flaky', 'Slow', 'LinuxOnly'). | ||
| Filters selected 2 tests to run. | ||
|
|
||
| Running tests from '...\real-life-tagging-scenarios.tests.ps1' | ||
| Describing Get-Beer | ||
| Context acceptance tests | ||
| [+] acceptance test 2 50ms (29ms|20ms) | ||
| [+] acceptance test 3 42ms (19ms|23ms) | ||
| Context acceptance tests | ||
| [+] acceptance test 2 50ms | ||
| [+] acceptance test 3 42ms |
Collaborator
There was a problem hiding this comment.
These are all part of Detailed+ verbosity output: Filters, running in file xyz, blocks and successful tests.
We should add a comment like # Output level: Detailed in examples it is essential, like the Filter-lines in this one.
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.
v6 documentation audit
A pass over the v6 (preview) docs (the
docs/folder). This PR contains the safe, unambiguous fixes; the remaining items are listed below as a backlog for follow-up.✅ Fixed in this PR (15 files)
Code / correctness
usage/modules.mdx— invalidShould Be→Should -Bein two examples (missing hyphen would not run).usage/setup-and-teardown.mdx—BeforeEachdefined$pathbut everyIt/AfterEachblock and the surrounding prose used$file; unified on$file. Also replaced the'xxx'placeholder path in the sample output.assertions/assertions.mdx— the-Existexample ranRemove-Item (Dir .)[0].FullName, which deletes a real file from the current directory if copy‑pasted. Replaced with a safeTestDrive:example.usage/data-driven-tests.mdx— removed a stray empty####heading.Stale / inconsistent content
usage/result-object.mdx— parallel runner requirementPowerShell 7+→7.4+(Pester 6 won't load below 7.4).usage/test-results.mdx— prose now references the realTestResult.Enabled/OutputFormat/OutputPathproperties instead of vague backticked names.assertions/custom-assertions.mdx— demo output'sDescribename now matches the code (Testing Should -BeUpperCaseOnly).Grammar / typos
data-driven-tests,test-file-structure,file-placement-and-naming— fixed incomplete/garbled sentences ("when using Data driven tests", "import files into tests", "a big impact on", "Pester v5").testdrive.mdx—it's→its, "inside it are deleted".assertions/should-command.mdx,assertions/custom-assertions.mdx— several typos (your→you,split into,provided,an object,comment-based).migrations/{v3-to-v4,v4-to-v5,breaking-changes-in-v5}.mdx—Dumy→Dummy,to to, garbled "configuraiton…" line, property casing.additional-resources/misc.mdx— removed a leftover## TBD("Waiting to be re-read and added") draft section that was live on the site.Verified with
yarn build(clean — no broken links/anchors).📋 Backlog — recommended follow-ups (not in this PR)
High
Starting discovery in N files./Discovery finished). The v6 migration guide says this is replaced by a singleRunning tests from N files.banner. These should be captured from a real 6.0.0 run rather than hand-edited.assertions/should-command.mdx— still marked:::warning Work in progress 🛠️ This page is incomplete. It's the headline v6 assertions page.Should-*pages have{{ Fill in the Description }}placeholders, and all 64 pages are stampedPester 6.0.0-alpha5. Fixes belong in the comment‑based help in pester/Pester, then re-run the generator.Medium
4. Write the "moving from
Should -BetoShould-Be" guide thatmigrations/v5-to-v6.mdxpromises ("will come later").5.
assertions/custom-assertions.mdxonly covers classicAdd-ShouldOperator; add guidance on authoring custom v6Should-*assertions.6.
additional-resources/courses.table.js— the Microsoft Virtual Academy link is dead (MVA was retired); remove/replace.7.
usage/configuration.mdxRun.Parallel description saysPowerShell 7+(sourced from the config object — fix upstream for 7.4+ consistency).Low / polish
8. Consider showcasing the new
Should-*syntax in the Quick Start (currently only classicShould -Be).9. Normalize command links (
../commands/Xvs../commands/X.mdx) and the summary-line format (Total:field) across pages.10.
usage/tags.mdxoutput mixes old + new framing and has aContext Unit testsvs"unit tests"casing mismatch.🤖 Generated with Copilot CLI.