zscripts-token-savers/tests
KellyMichels 351cf9f574 perf(tests): run each child-process invocation once
Every Invoke-ZScript call starts a fresh Windows PowerShell, which costs about
1.7 seconds - and it is the dominant cost of this file. Thirteen of its
forty-three calls re-run a command an earlier check has already run. The usage
tests are the clearest case: a script is run bare three separate times to
assert that it exits non-zero, that its usage lists the project keys, and that
the usage never mentions the underscore comment key. Those are three questions
about one run.

Memoised on the exact command, so each distinct invocation happens once and
every check that asks for it gets the same captured result. The commands
reached here either refuse their input or inspect an unused fixture port, so
none has a side effect a second run would reveal.

ArgumentParsing.Tests.ps1, over three runs each: 83/108/88s before,
61/68/79s after. All 42 tests still pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 14:47:17 -05:00
..
fixtures test: add Pester suite for ZHelpers pure logic + ZCONFIG seam (phases 1-2) (#27) 2026-07-26 12:20:32 -05:00
ArgumentParsing.Tests.ps1 perf(tests): run each child-process invocation once 2026-09-10 14:47:17 -05:00
Checksums.Tests.ps1 chore: point repo URLs at evomedia-net/evo.* (#44) 2026-08-09 11:31:43 -05:00
DeployTag.Tests.ps1 chore(mirror): mirror tagOnDeploy and the zstart gitPull fix, and stop publishing current product names (#72) 2026-09-08 13:40:45 -05:00
Invoke-Coverage.ps1 test(coverage): run the Pester suite with code coverage (#47) 2026-08-13 16:26:19 -05:00
NewProjectArchive.Tests.ps1 chore: point repo URLs at evomedia-net/evo.* (#44) 2026-08-09 11:31:43 -05:00
PlainTextTwins.Tests.ps1 docs(changelog): give every shipped release its own section, and generate the twin (#68) 2026-08-31 18:39:01 -05:00
sanitization-patterns.psd1 chore(mirror): mirror tagOnDeploy and the zstart gitPull fix, and stop publishing current product names (#72) 2026-09-08 13:40:45 -05:00
Sanitization.Tests.ps1 chore(mirror): mirror tagOnDeploy and the zstart gitPull fix, and stop publishing current product names (#72) 2026-09-08 13:40:45 -05:00
StartGitPull.Tests.ps1 chore(mirror): mirror tagOnDeploy and the zstart gitPull fix, and stop publishing current product names (#72) 2026-09-08 13:40:45 -05:00
VerifyPlan.Tests.ps1 chore(mirror): mirror tagOnDeploy and the zstart gitPull fix, and stop publishing current product names (#72) 2026-09-08 13:40:45 -05:00
ZHelpers.Tests.ps1 chore: point repo URLs at evomedia-net/evo.* (#44) 2026-08-09 11:31:43 -05:00