Skip to content
This repository was archived by the owner on Jul 16, 2026. It is now read-only.

v3.0.11

Choose a tag to compare

@github-actions github-actions released this 08 Jul 09:47
033609e

🪲 [Fix]: Type-accelerator tests handle modules without enums or classes (#120)

Module test runs now handle modules that export only one kind of public type under Pester 6. Type-accelerator checks skip empty enum or class collections instead of failing discovery, so Test-PSModule can validate modules that have classes without enums, enums without classes, or both.

Fixed: Type-accelerator tests handle missing enum or class exports

Modules no longer fail the Test-PSModule module test suite just because one type category is empty. If a module has public classes but no public enums, the enum registration check is skipped and the class registration checks still run. If a module has public enums but no public classes, the class registration check is skipped and the enum registration checks still run.

This resolves the Pester 6 discovery failure caused by empty -ForEach collections while preserving coverage for the exported types that do exist.

Technical Details

  • src/tests/Module/PSModule/PSModule.Tests.ps1 now passes -AllowNullOrEmptyForEach to both type-accelerator It blocks.
  • .github/workflows/Action-Test-outputs.yml now runs the output fixture workflow against both the existing class-only fixture and a new enum-only fixture.
  • tests/outputEnumOnlyTestRepo/outputs/module/PSModuleEnumOnly adds a minimal enum-only module fixture for the missing coverage path.
  • The enum-only fixture cleanup only removes accelerators that still point to the type exported by that fixture, avoiding removal of pre-existing accelerators with the same name.