Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Add support for passing a PesterConfiguration object to PowerShellBuild

Abierto
#83 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
powershell
Área
testing

Línea de trabajo

Empieza por rastrear cómo PowerShellBuild invoca Pester y cómo se aplican las opciones existentes de $PSBPreference.Test. Revisa el valor propuesto de $PSBPreference.Test.Configuration y los ejemplos de PesterConfiguration; después, resuelve la precedencia de las rutas y otras configuraciones. La tarea estará terminada cuando los usuarios puedan proporcionar una configuración y el comportamiento de prueba predeterminado previsto siga siendo claro y esté cubierto.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement

Currently PowerShellBuild accepts several options to control how Pester is invoked through the $PSBPreference variable. However, there are more Pester options available if you go the "advanced" route and pass in a [PesterConfiguration] object.

You can generate a configuration a few different ways...

$config = New-PesterConfiguration

$config = [PesterConfiguration]::Default

$config = [PesterConfiguration]::new()

We could support all Pester options in an easier way than implementing $PSBPreference settings for each of them individually by allowing users to provide their own Pester configuration like so...

# file: psakeFile.ps1
Properties {
    $PSBPreference.Test.Configuration = New-PesterConfiguration -Hashtable @{
        # Change defaults as needed. For example...
        Run = @{
            SkipRemainingOnFailure = 'Run'
        }
    }
}

There are some considerations though. For example, the advanced option allows providing multiple paths. Should PowerShellBuild be opinionated and aim to maintain the current test behavior by default? If PowerShellBuild overrides properties like Run.Path, should the user be allowed to change that? How so?

Maybe other values from $PSBPreference.Test should be used to override the user-supplied [PesterConfiguration] and if they want to override those defaults, they should do it by updating the corresponding $PSBPreference.Test.* property?

Lenguaje dominante
PowerShell
Estrellas
145
Forks
27
Merge medio
10 h 16 min
PR fusionados (30 d)
34

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.

Más de psake/PowerShellBuild

Todos los issues de psake/PowerShellBuild

Issues similares

Más issues de Testing & QA

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.