diff --git a/__tests__/RelativePath.tests.ps1 b/__tests__/Path.tests.ps1 similarity index 70% rename from __tests__/RelativePath.tests.ps1 rename to __tests__/Path.tests.ps1 index 2b461f0..cfc24bf 100644 --- a/__tests__/RelativePath.tests.ps1 +++ b/__tests__/Path.tests.ps1 @@ -19,11 +19,6 @@ $actual | Should Not Be $null } - # It "Should read with PSScriptRoot" { - # $actual = Import-Excel -Path "$PSScriptRoot\$($script:xlfileName)" - # $actual | Should Not Be $null - # } - It "Should read with just a file name and resolve to cwd" { $actual = Import-Excel -Path "$($script:xlfileName)" $actual | Should Not Be $null @@ -32,4 +27,12 @@ It "Should fail for not found" { { Import-Excel -Path "ExcelFileDoesNotExist.xlsx" } | Should Throw "'ExcelFileDoesNotExist.xlsx' file not found" } + + It "Should fail for xls extension" { + { Import-Excel -Path "ExcelFileDoesNotExist.xls" } | Should Throw "Import-Excel does not support reading this extension type .xls" + } + + It "Should fail for xlsxs extension" { + { Import-Excel -Path "ExcelFileDoesNotExist.xlsxs" } | Should Throw "Import-Excel does not support reading this extension type .xlsxs" + } } \ No newline at end of file