From dd22ae916166e3fad3c0ae42c55177ac57129406 Mon Sep 17 00:00:00 2001 From: jpomfret Date: Mon, 28 Aug 2023 15:22:21 +0000 Subject: [PATCH 1/7] uncomment module tests --- tests/QA/module.tests.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/QA/module.tests.ps1 b/tests/QA/module.tests.ps1 index ff533596..70afe18e 100644 --- a/tests/QA/module.tests.ps1 +++ b/tests/QA/module.tests.ps1 @@ -1,4 +1,4 @@ -<# + BeforeDiscovery { $script:moduleName = $ProjectName @@ -211,4 +211,3 @@ Describe 'Help for module' -Tags 'helpQuality' { } } -#> \ No newline at end of file From f6475a58595370f5caa41d6f50f6e4c3f3fd7524 Mon Sep 17 00:00:00 2001 From: jpomfret Date: Mon, 28 Aug 2023 15:37:03 +0000 Subject: [PATCH 2/7] comment out sa tests --- tests/QA/module.tests.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/QA/module.tests.ps1 b/tests/QA/module.tests.ps1 index 70afe18e..6fff0340 100644 --- a/tests/QA/module.tests.ps1 +++ b/tests/QA/module.tests.ps1 @@ -76,6 +76,7 @@ Describe 'General module control' -Tags 'FunctionalQuality' { } } + BeforeDiscovery { # Must use the imported module to build test cases. $allModuleFunctions = & $mut { Get-Command -Module $args[0] -CommandType Function } $script:moduleName @@ -90,7 +91,7 @@ BeforeDiscovery { } } } - +<# Describe 'Quality for module' -Tags 'TestQuality' { BeforeDiscovery { if (Get-Command -Name Invoke-ScriptAnalyzer -ErrorAction SilentlyContinue) @@ -123,6 +124,7 @@ Describe 'Quality for module' -Tags 'TestQuality' { "some rule triggered.`r`n`r`n $report" } } +#> Describe 'Help for module' -Tags 'helpQuality' { It 'Should have .SYNOPSIS for ' -ForEach $testCases { @@ -210,4 +212,3 @@ Describe 'Help for module' -Tags 'helpQuality' { } } } - From 5bf2533d319a5496805d1653c0016dc4136920d6 Mon Sep 17 00:00:00 2001 From: jpomfret Date: Mon, 28 Aug 2023 15:52:10 +0000 Subject: [PATCH 3/7] comment help ones we need some help for that --- tests/QA/module.tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/QA/module.tests.ps1 b/tests/QA/module.tests.ps1 index 6fff0340..29fce0ca 100644 --- a/tests/QA/module.tests.ps1 +++ b/tests/QA/module.tests.ps1 @@ -124,7 +124,6 @@ Describe 'Quality for module' -Tags 'TestQuality' { "some rule triggered.`r`n`r`n $report" } } -#> Describe 'Help for module' -Tags 'helpQuality' { It 'Should have .SYNOPSIS for ' -ForEach $testCases { @@ -212,3 +211,4 @@ Describe 'Help for module' -Tags 'helpQuality' { } } } +#> \ No newline at end of file From 6cfac61716dec27eded06c3504bb3e3577a4eba7 Mon Sep 17 00:00:00 2001 From: jpomfret Date: Mon, 28 Aug 2023 15:22:21 +0000 Subject: [PATCH 4/7] uncomment module tests --- tests/QA/module.tests.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/QA/module.tests.ps1 b/tests/QA/module.tests.ps1 index ff533596..70afe18e 100644 --- a/tests/QA/module.tests.ps1 +++ b/tests/QA/module.tests.ps1 @@ -1,4 +1,4 @@ -<# + BeforeDiscovery { $script:moduleName = $ProjectName @@ -211,4 +211,3 @@ Describe 'Help for module' -Tags 'helpQuality' { } } -#> \ No newline at end of file From cd2b036ce4cb6a90e9982d37fc020eba12817114 Mon Sep 17 00:00:00 2001 From: jpomfret Date: Mon, 28 Aug 2023 15:37:03 +0000 Subject: [PATCH 5/7] comment out sa tests --- tests/QA/module.tests.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/QA/module.tests.ps1 b/tests/QA/module.tests.ps1 index 70afe18e..6fff0340 100644 --- a/tests/QA/module.tests.ps1 +++ b/tests/QA/module.tests.ps1 @@ -76,6 +76,7 @@ Describe 'General module control' -Tags 'FunctionalQuality' { } } + BeforeDiscovery { # Must use the imported module to build test cases. $allModuleFunctions = & $mut { Get-Command -Module $args[0] -CommandType Function } $script:moduleName @@ -90,7 +91,7 @@ BeforeDiscovery { } } } - +<# Describe 'Quality for module' -Tags 'TestQuality' { BeforeDiscovery { if (Get-Command -Name Invoke-ScriptAnalyzer -ErrorAction SilentlyContinue) @@ -123,6 +124,7 @@ Describe 'Quality for module' -Tags 'TestQuality' { "some rule triggered.`r`n`r`n $report" } } +#> Describe 'Help for module' -Tags 'helpQuality' { It 'Should have .SYNOPSIS for ' -ForEach $testCases { @@ -210,4 +212,3 @@ Describe 'Help for module' -Tags 'helpQuality' { } } } - From 065358d211eec6c0102157a16c843ef4935e3723 Mon Sep 17 00:00:00 2001 From: jpomfret Date: Mon, 28 Aug 2023 15:52:10 +0000 Subject: [PATCH 6/7] comment help ones we need some help for that --- tests/QA/module.tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/QA/module.tests.ps1 b/tests/QA/module.tests.ps1 index 6fff0340..29fce0ca 100644 --- a/tests/QA/module.tests.ps1 +++ b/tests/QA/module.tests.ps1 @@ -124,7 +124,6 @@ Describe 'Quality for module' -Tags 'TestQuality' { "some rule triggered.`r`n`r`n $report" } } -#> Describe 'Help for module' -Tags 'helpQuality' { It 'Should have .SYNOPSIS for ' -ForEach $testCases { @@ -212,3 +211,4 @@ Describe 'Help for module' -Tags 'helpQuality' { } } } +#> \ No newline at end of file From f266607ac08afc8f9629c8af863f054d30dcdc6d Mon Sep 17 00:00:00 2001 From: jpomfret Date: Mon, 28 Aug 2023 16:17:12 +0000 Subject: [PATCH 7/7] add update to changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff762546..376626a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- added pester tests to check that changelog is edited. + ## [3.0.1-preview0025] - 2023-08-28 ### Added