PowerShell / PowerShell/PSScriptAnalyzer
Question: How to manage module version in Pester tests for this module?
@kapilmb ya está trabajando en esto.
Desde el 3/8/2016.
- Lenguaje dominante
- C#
- Estrellas
- 2.2k
- Forks
- 414
- Merge medio
- 13 h 1 min
- PR fusionados (30 d)
- 2
Descripción
I was dreaming up code to make sure that my Pester tests in the Tests\Engine folder are always testing the version of the module in which the directory resides. But, I noticed that the other .Tests.ps1 files in Tests\Engine just import the module by name w/o regard to version.
// From CorrectionExtent.Tests.ps1 & similar in RuleSuppressions.Tests.ps1
if (!(Get-Module PSScriptAnalyzer)) {Import-Module PSScriptAnalyzer}
This code just imports the first PSScriptAnalyzer instance found in the $env:PSModulePath directory order, which is typically the newest in $home. It might not be the version under test.
Is there some reason that these will work? I don't want to add extra code for no good reason.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Evaluación
Este issue todavía no se ha evaluado.