Skip to content

docs: v6 audit — fix code errors, typos, and stale content#386

Merged
nohwnd merged 4 commits into
mainfrom
nohwnd-audit-v6-docs
Jun 30, 2026
Merged

docs: v6 audit — fix code errors, typos, and stale content#386
nohwnd merged 4 commits into
mainfrom
nohwnd-audit-v6-docs

Conversation

@nohwnd

@nohwnd nohwnd commented Jun 29, 2026

Copy link
Copy Markdown
Member

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 — invalid Should BeShould -Be in two examples (missing hyphen would not run).
  • usage/setup-and-teardown.mdxBeforeEach defined $path but every It/AfterEach block and the surrounding prose used $file; unified on $file. Also replaced the 'xxx' placeholder path in the sample output.
  • assertions/assertions.mdx — the -Exist example ran Remove-Item (Dir .)[0].FullName, which deletes a real file from the current directory if copy‑pasted. Replaced with a safe TestDrive: example.
  • usage/data-driven-tests.mdx — removed a stray empty #### heading.

Stale / inconsistent content

  • usage/result-object.mdx — parallel runner requirement PowerShell 7+7.4+ (Pester 6 won't load below 7.4).
  • usage/test-results.mdx — prose now references the real TestResult.Enabled/OutputFormat/OutputPath properties instead of vague backticked names.
  • assertions/custom-assertions.mdx — demo output's Describe name 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.mdxit'sits, "inside it are deleted".
  • assertions/should-command.mdx, assertions/custom-assertions.mdx — several typos (youryou, split into, provided, an object, comment-based).
  • migrations/{v3-to-v4,v4-to-v5,breaking-changes-in-v5}.mdxDumyDummy, 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

  1. Regenerate every console-output sample for v6. All ~44 output blocks across 9 pages (quick-start, skip, configuration, setup-and-teardown, data-driven-tests, tags, custom-assertions, should-command) still show the v5 framing (Starting discovery in N files. / Discovery finished). The v6 migration guide says this is replaced by a single Running tests from N files. banner. These should be captured from a real 6.0.0 run rather than hand-edited.
  2. Finish assertions/should-command.mdx — still marked :::warning Work in progress 🛠️ This page is incomplete. It's the headline v6 assertions page.
  3. Regenerate the command reference — 30 Should-* pages have {{ Fill in the Description }} placeholders, and all 64 pages are stamped Pester 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 -Be to Should-Be" guide that migrations/v5-to-v6.mdx promises ("will come later").
5. assertions/custom-assertions.mdx only covers classic Add-ShouldOperator; add guidance on authoring custom v6 Should-* assertions.
6. additional-resources/courses.table.js — the Microsoft Virtual Academy link is dead (MVA was retired); remove/replace.
7. usage/configuration.mdx Run.Parallel description says PowerShell 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 classic Should -Be).
9. Normalize command links (../commands/X vs ../commands/X.mdx) and the summary-line format (Total: field) across pages.
10. usage/tags.mdx output mixes old + new framing and has a Context Unit tests vs "unit tests" casing mismatch.

🤖 Generated with Copilot CLI.

nohwnd and others added 4 commits June 30, 2026 09:28
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>
@nohwnd nohwnd force-pushed the nohwnd-audit-v6-docs branch from 9391c9f to c2afcf0 Compare June 30, 2026 07:54
@nohwnd nohwnd merged commit d2d9cb7 into main Jun 30, 2026
4 checks passed
@nohwnd nohwnd deleted the nohwnd-audit-v6-docs branch June 30, 2026 08:39
Comment thread docs/usage/tags.mdx
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

@fflaten fflaten Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants