From 970febd6d3250b11b73732fb0fdd1e2762a282ab Mon Sep 17 00:00:00 2001 From: dfinke Date: Thu, 20 Oct 2022 20:13:27 -0400 Subject: [PATCH] The orignal test took too long to run --- .../ImportExcelEndRowEndColumn.tests.ps1 | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/__tests__/ImportExcelTests/ImportExcelEndRowEndColumn.tests.ps1 b/__tests__/ImportExcelTests/ImportExcelEndRowEndColumn.tests.ps1 index 4667203..779571d 100644 --- a/__tests__/ImportExcelTests/ImportExcelEndRowEndColumn.tests.ps1 +++ b/__tests__/ImportExcelTests/ImportExcelEndRowEndColumn.tests.ps1 @@ -34,17 +34,9 @@ Describe 'Test' -Tag ImportExcelEndRowAndCols { } It 'Should read any row up to maximum allowed row' { - # Max Rows sheet has row number as integer in column 1. $xlMaxRows = "$PSScriptRoot\MaxRows.xlsx" - # Construct array of ten numbers. Min (1), 8 random numbers between Min and max, Max (1048576) - $countOfTen = @(1) - $countOfTen += (Get-Random -Count 8 -InputObject (2..1048575)) | Sort-Object - $countOfTen += 1048576 - # Test these cell values. - $countOfTen | ForEach-Object { - $actual = Import-Excel $xlMaxRows -StartRow $_ -EndRow $_ -NoHeader - $actual.P1 | Should -Be $_ - } + $actual = Import-Excel $xlMaxRows -StartRow 1048576 -EndRow 1048576 -NoHeader + $actual.P1 | Should -Be 1048576 } }