From 33d86cb3c96b242ae65f14236601dd8bc2c83b8d Mon Sep 17 00:00:00 2001 From: Ili Metuky Date: Tue, 13 Mar 2018 15:13:28 +0200 Subject: [PATCH] Fixed the bug "Unable to find type [PSPlot]" Also added a test for it in ImportExcel.Tests.ps1 The previous fix was broke again by commit: https://github.com/dfinke/ImportExcel/commit/bd40cfe829d6128ac39296805ed5c41ff424bc0f#diff-f50d26003c0baf98f417a44fc1cac92b --- ImportExcel.Tests.ps1 | 11 +++++++++++ ImportExcel.psm1 | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ImportExcel.Tests.ps1 b/ImportExcel.Tests.ps1 index 91d8042..faacee7 100644 --- a/ImportExcel.Tests.ps1 +++ b/ImportExcel.Tests.ps1 @@ -2070,4 +2070,15 @@ Context 'special cases' { } } } +} + +Context 'General Tests' { + in $TestDrive { + Describe 'Get Help' { + it 'New-Plot' { + #Get-Help : Unable to find type [PSPlot]. + {Help New-Plot} | Should -Not -Throw + } + } + } } \ No newline at end of file diff --git a/ImportExcel.psm1 b/ImportExcel.psm1 index 777f5d1..d88e8ae 100644 --- a/ImportExcel.psm1 +++ b/ImportExcel.psm1 @@ -39,7 +39,6 @@ if ($PSVersionTable.PSVersion.Major -ge 5) { . $PSScriptRoot\Plot.ps1 Function New-Plot { - [OutputType([PSPlot])] Param() [PSPlot]::new()