Repository navigation
Tests: Create shared fixture module #97
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Create a minimal shared fixture module to be used by the integration-test sub-tasks of #17 (#98, #99, #100, #101, #102, #103).
Agreed design (2026-07-09)
Location and name: tests/fixtures/PSBuildTestFixture/. The name is deliberately distinct from the existing tests/TestModule/ — PowerShell session state is keyed by module name, so two modules both named TestModule would invite cross-contamination between test files.
Contents (inert data only — no build files, no requirements.psd1, no nested test suite):
PSBuildTestFixture.psd1— valid manifest, version 0.1.0PSBuildTestFixture.psm1— dot-sourcesPublic/andPrivate/Public/— two functions with complete comment-based help (synopsis, description, parameters, examples) so the help-pipeline tests (Tests: Build-PSBuildMarkdown #99, Tests: Build-PSBuildMAMLHelp #100, Tests: Build-PSBuildUpdatableHelp #101) have real material. No.LINKURLs, so no test ever makes a network callPrivate/— one internal helper, for export and compile assertions (Tests: Build-PSBuildModule #98)excludeme.txt— exercises$PSBPreference.Build.Excludepatterns (Tests: Build-PSBuildModule #98)tests/fixtures/FixtureHelpers.psm1—Copy-PSBuildTestFixturehelper that copies the fixture into$TestDrive; consuming tests always work on a copy, never the checked-in fixture
Scope boundaries:
- The existing
tests/TestModule/is untouched — it keeps servingtests/build.tests.ps1for end-to-end child-process builds. Consolidating the two fixtures, if ever desired, is a separate issue - Crash/failure test files (needed by Tests: Test-PSBuildPester #102) are not checked in — they get generated into
$TestDriveat runtime so the repository's own Pester run can never discover them - Fixture content stays minimal; sub-tasks add material (for example
Classes//Enum/directories for compile-order tests) in the pull request that actually tests it
Ships with a smoke test (tests/Fixtures.tests.ps1): manifest validates, module imports from a $TestDrive copy, expected exports.
Target Pester 6.0.0 with classic Should syntax — see notes on #17. Parent issue: #17
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity
test: Add PSBuildTestFixture shared fixture module
fix: Make the script analysis severity threshold fail the build (#143)