From 460d6db86360f5722b8e8e33b6cdfe8933b0421c Mon Sep 17 00:00:00 2001 From: Frode Flaten <3436158+fflaten@users.noreply.github.com> Date: Wed, 10 Apr 2024 23:48:58 +0200 Subject: [PATCH] Add missing help for -Skip in Context and Describe (#2426) * Add missing help for -Skip in Context and Describe * Update -Skip parameter help in It --- src/functions/Context.ps1 | 4 ++++ src/functions/Describe.ps1 | 4 ++++ src/functions/It.ps1 | 3 +-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/functions/Context.ps1 b/src/functions/Context.ps1 index fce405d3f..83e434616 100644 --- a/src/functions/Context.ps1 +++ b/src/functions/Context.ps1 @@ -22,6 +22,10 @@ Script that is executed. This may include setup specific to the context and one or more It blocks that validate the expected outcomes. + .PARAMETER Skip + Use this parameter to explicitly mark the block to be skipped. This is preferable to temporarily + commenting out a block, because it remains listed in the output. + .PARAMETER ForEach Allows data driven tests to be written. Takes an array of data and generates one block for each item in the array, and makes the item diff --git a/src/functions/Describe.ps1 b/src/functions/Describe.ps1 index 94ed13c90..757bcbb89 100644 --- a/src/functions/Describe.ps1 +++ b/src/functions/Describe.ps1 @@ -24,6 +24,10 @@ it is possible to specify a -Tag parameter which will only execute Describe blocks containing the same Tag. + .PARAMETER Skip + Use this parameter to explicitly mark the block to be skipped. This is preferable to temporarily + commenting out a block, because it remains listed in the output. + .PARAMETER ForEach Allows data driven tests to be written. Takes an array of data and generates one block for each item in the array, and makes the item diff --git a/src/functions/It.ps1 b/src/functions/It.ps1 index 227fc7c3a..2ceced63f 100644 --- a/src/functions/It.ps1 +++ b/src/functions/It.ps1 @@ -35,8 +35,7 @@ .PARAMETER Skip Use this parameter to explicitly mark the test to be skipped. This is preferable to temporarily - commenting out a test, because the test remains listed in the output. Use the Strict parameter - of Invoke-Pester to force all skipped tests to fail. + commenting out a test, because the test remains listed in the output. .PARAMETER ForEach (Formerly called TestCases.) Optional array of hashtable (or any IDictionary) objects.