PowerShell / PowerShell/PSScriptAnalyzer

Question: How to manage module version in Pester tests for this module?

Abierto
#528 1 comentario 0 reacciones 1 asignado Ver en GitHub

@kapilmb ya está trabajando en esto.

Desde el 3/8/2016.

Issue - Enhancement
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

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.