You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments','', Justification ='Suppressing this rule because Script Analyzer does not understand Pester syntax.')]
2
+
param ()
3
+
4
+
BeforeDiscovery {
5
+
try
6
+
{
7
+
if (-not (Get-Module-Name 'DscResource.Test'))
8
+
{
9
+
# Assumes dependencies have been resolved, so if this module is not available, run 'noop' task.
10
+
if (-not (Get-Module-Name 'DscResource.Test'-ListAvailable))
11
+
{
12
+
# Redirect all streams to $null, except the error stream (stream 2)
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments','', Justification ='Suppressing this rule because Script Analyzer does not understand Pester syntax.')]
2
+
param ()
3
+
4
+
BeforeDiscovery {
5
+
try
6
+
{
7
+
if (-not (Get-Module-Name 'DscResource.Test'))
8
+
{
9
+
# Assumes dependencies have been resolved, so if this module is not available, run 'noop' task.
10
+
if (-not (Get-Module-Name 'DscResource.Test'-ListAvailable))
11
+
{
12
+
# Redirect all streams to $null, except the error stream (stream 2)
0 commit comments