PSMutant.psd1
|
@{ RootModule = 'PSMutant.psm1' ModuleVersion = '0.9.0' GUID = '9c19f399-e58d-4087-829a-22e5a7ec3282' Author = 'Fortigi' CompanyName = 'Fortigi' Copyright = '(c) Fortigi. MIT licensed.' Description = 'Mutation testing for PowerShell. Injects small faults (flip -eq to -ne, $true to $false, N to N+1, drop -not) into your scripts using the PowerShell AST and reports how many your Pester suite catches - the metric line coverage cannot give you. Runs mutants in a throwaway sandbox so your source is never modified. Requires Pester 5.2.0 or later AT RUN TIME, and deliberately does not declare it as a RequiredModule: PSMutant runs under whichever Pester >= 5.2.0 you have loaded rather than importing one for you. Install Pester yourself if you do not already have it.' PowerShellVersion = '7.0' # One function. Get-PSMutationCandidate and Set-PSMutationText used to be exported too, # and between them they trafficked a nine-field [pscustomobject] that nothing declared, # tested as a contract or versioned -- discoverable only by running the function and # inspecting the output, and unchangeable once someone had. Neither was ever mentioned in # the README, and Set-PSMutationText had exactly one caller, inside this module (#48). # # "What would you mutate?" is a fair question to ask, and the answer should be a rendering # this module controls -- see #10's -ListOnly -- not a raw AST walker handing out its # internals. FunctionsToExport = @('Invoke-PSMutation') CmdletsToExport = @() VariablesToExport = @() AliasesToExport = @() # NO RequiredModules entry for Pester, deliberately. ModuleVersion there is a MINIMUM # and PowerShell satisfies it by importing the NEWEST installed version -- at import # time, before Assert-PSMutationPester or Get-PSMutationPesterPath can have a say. That # made `Import-Module PSMutant` followed by `Import-Module Pester -RequiredVersion 5.7.1` # fail on an assembly collision and leave the caller on 6.1.0, while the same two lines # in the other order worked -- issue #16's failure one layer up, with no diagnostic. # # Pester is needed at RUN time, not import time, and Assert-PSMutationPester is the single # point that enforces it: it accepts an already-loaded Pester >= 5, imports one only when # none is loaded, and refuses with an actionable message otherwise. The cost is that # Install-Module PSMutant no longer pulls Pester in for you; that is stated in the # description, the README and the error message. PrivateData = @{ PSData = @{ Tags = @('mutation-testing', 'testing', 'pester', 'ast', 'quality', 'test-quality', 'coverage') LicenseUri = 'https://github.com/Fortigi/PSMutant/blob/main/LICENSE' ProjectUri = 'https://github.com/Fortigi/PSMutant' ReleaseNotes = 'PSMutant 0.9.0 - Two opt-in operators reach the numbers and arithmetic the defaults never touched. - Every mutant can be written in the format Stryker''s tools read. - -Incremental now reuses a file covered by more than one test file. - A dependency measurement that fails no longer fails the run''s CI step. Full release notes: https://github.com/Fortigi/PSMutant/releases/tag/v0.9.0' } } } |