test/documentation/New-ExternalHelpFromPlatyPSMarkdown.Tests.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using module ..\.\TestRunnerSupportModule.psm1

Describe "Test New-ExternalHelpFromPlatyPSMarkdown" {
    BeforeAll {
        $TestSupportModule = [TestRunnerSupportModule]::new('MockModuleB')
    }
    
    AfterAll {
        $TestSupportModule.Teardown()
    }

    Context "As a non-piped call, with a given Path generate files from MarkdownFolder to OutputFolder folder." {

        New-ExternalHelpFromPlatyPSMarkdown -Path ($TestSupportModule.MockDirectoryPath)

        It "Should generate a file in 'en-US' folder" {
            $HelpDocFile = Get-Item (($TestSupportModule.MockDirectoryPath) + "\en-US\*xml")
            $HelpDocFile | Should -Exist
        }
    }
}