Skip to content

Commit

Permalink
Added test for Unreleased section in changelog (#64)
Browse files Browse the repository at this point in the history
* Added test for Unreleased section in changelog

* Updated QA test
  • Loading branch information
ykuijs authored and PlagueHO committed Jan 24, 2020
1 parent fad4701 commit a896773
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Added a test to check for the correct formatting of the Unreleased section
in the Changelog

## [0.12.1] - 2020-01-16

### Fixed

- Update the cmdlet `Initialize-TestEnvironment` to allow setting up
the environment when run in PowerShell 5.0.
- Update the pipeline so the module will be tested on PowerShell 5.0
- Update the pipeline so the module will be tested on PowerShell 5.0
(Microsoft-hosted agent running Windows Server 2012 R2).

## [0.12.0] - 2020-01-16
Expand Down
4 changes: 4 additions & 0 deletions source/Tests/QA/Changelog.common.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ try
It 'Changelog format compliant with keepachangelog format' -Skip:$skipTest {
{ Get-ChangelogData -Path (Join-Path -Path $ProjectPath -ChildPath 'CHANGELOG.md') -ErrorAction 'Stop' } | Should -Not -Throw
}

It 'Changelog should have an Unreleased header' -Skip:$skipTest {
(Get-ChangelogData -Path (Join-Path -Path $ProjectPath -ChildPath 'CHANGELOG.md') -ErrorAction 'Stop').Unreleased.RawData | Should -Not -BeNullOrEmpty
}
}
}
finally
Expand Down
4 changes: 4 additions & 0 deletions tests/QA/module.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ $allModuleFunctions = &$mut {Get-Command -Module $args[0] -CommandType Function
It 'Changelog format compliant with keepachangelog format' -skip:(![bool](Get-Command git -EA SilentlyContinue)) {
{ Get-ChangelogData (Join-Path $ProjectPath 'CHANGELOG.md') -ErrorAction Stop } | Should -Not -Throw
}

It 'Changelog should have an Unreleased header' -Skip:$skipTest {
(Get-ChangelogData -Path (Join-Path -Path $ProjectPath -ChildPath 'CHANGELOG.md') -ErrorAction 'Stop').Unreleased.RawData | Should -Not -BeNullOrEmpty
}
}

Describe 'General module control' -Tags 'FunctionalQuality' {
Expand Down

0 comments on commit a896773

Please sign in to comment.