BeforeAll { $Repo = Get-RepoPath Import-Module $Repo.Src.Manifest.Item.FullName -Force } Describe 'Install-ModuleDependency' { Context 'Default tests' -Tag 'Default' { It 'Test Function' { { Get-Command -Name 'Install-ModuleDependency' -Module $Repo.Artifact } | Should -Not -Throw } It 'Test Help' { { Get-Help -Name 'Install-ModuleDependency' } | Should -Not -Throw } It 'Help Content' { $foo = Get-Help -Name 'Install-ModuleDependency' $foo.Synopsis.Length | Should -BeGreaterThan 5 $foo.Description.Count | Should -BeGreaterOrEqual 1 $foo.Description[0].Text.Length | Should -BeGreaterThan 5 } } Context 'Unit tests' -Tag 'Unit' { It 'Should throw' { { Install-ModuleDependency -foo } | Should -Throw } #It 'Should not throw' { # Mock 'Install-Module' -ModuleName $Repo.Artifact {} # { Install-ModuleDependency } | Should -Not -Throw #} } }