PowerShell / PowerShell/PSScriptAnalyzer

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

オープン
#528 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

@kapilmb がすでに取り組んでいます。

2016年8月3日 から。

Issue - Enhancement
主要言語
C#
スター
2.2k
フォーク
414
平均マージ
13時間 1分
マージ済み PR(30日)
2

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。