Test harness: run behaviour tests against the source tree, fix error-preference leak into Pester - #3
Merged
Merged
Conversation
…m errors stay non-terminating
…, build before running
…, or the build is stale
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.
Fixes two test-harness defects, a loader bug and class/enum documentation.
Error-preference leak. The runners set
$ErrorActionPreference = 'Stop'at file scope, which Pester scopes inherit, so tests asserting a non-terminating error saw a throw instead and failed. Fixed by lowering toContinuearoundInvoke-Pesteronly;Tests/Harness.Tests.ps1adds a regression test.Tests only ran against the build output. Behaviour tests now import the tree picked by
-Target(defaultSource), so failures name a source file and line; artifact tests inModule.Tests.ps1keep readingDist/and gain stale-build and build-integrity checks.test/coveragebuild first,-Pathselects test files, coverage reports per source file, and CI runs one step per target because two Pester runs poison one process.Loader bug. The dev loader did not recurse into source subdirectories while ModuleBuilder does; now
-Recurse | Sort-Object FullName, matching build order exactly.Class/enum limits (alphabetical load order, no
using modulebetween source files, types only visible from the built manifest) are documented inDocs/CLASSES_AND_ENUMS.md, template-only, deleted byprepare.