Add support for passing a PesterConfiguration object to PowerShellBuild
まだ誰も着手していません。
- 主要言語
- PowerShell
- スター
- 145
- フォーク
- 27
- 平均マージ
- 10時間 16分
- マージ済み PR(30日)
- 34
説明
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?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、PowerShellBuild がどのように Pester を呼び出し、既存の $PSBPreference.Test オプションがどのように適用されるかを追跡します。提案されている $PSBPreference.Test.Configuration の値と PesterConfiguration の例を確認し、その後、パスやその他の設定の優先順位を解決します。ユーザーが構成を指定でき、意図されたデフォルトのテスト動作が引き続き明確で、カバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- powershell
- 領域
- testing
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 活発
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100