From 7177623104c63aaf6bdf2bda0416b97e746d5b2c Mon Sep 17 00:00:00 2001 From: Roy Ashbrook Date: Mon, 8 Nov 2021 18:21:11 -0500 Subject: [PATCH] add silent continue to cmd check tests --- __tests__/Read-OleDbDataTests/Invoke-ExcelQuery.Tests.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/Read-OleDbDataTests/Invoke-ExcelQuery.Tests.ps1 b/__tests__/Read-OleDbDataTests/Invoke-ExcelQuery.Tests.ps1 index 46e964d..e79f96d 100644 --- a/__tests__/Read-OleDbDataTests/Invoke-ExcelQuery.Tests.ps1 +++ b/__tests__/Read-OleDbDataTests/Invoke-ExcelQuery.Tests.ps1 @@ -31,10 +31,10 @@ Describe "Invoke-ExcelQuery" -Tag "Invoke-ExcelQuery" { Test-Path $tfp | Should -Be $true } It "Should have the Read-OleDbData command loaded" { - (Get-Command Read-OleDbData) -ne $null | Should -Be $true + (Get-Command Read-OleDbData -ErrorAction SilentlyContinue) -ne $null | Should -Be $true } It "Should have the Invoke-ExcelQuery command loaded" { - (Get-Command Invoke-ExcelQuery) -ne $null | Should -Be $true + (Get-Command Invoke-ExcelQuery -ErrorAction SilentlyContinue) -ne $null | Should -Be $true } } Context "Sheet1`$A1" {