Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix ResolveBuildManifest Tests (it no longer throws) in this branch
  • Loading branch information
Jaykul committed Jan 14, 2020
commit 0d78ae5bdb453819bce2913b07c99ed81d139393
18 changes: 12 additions & 6 deletions Tests/Private/ResolveBuildManifest.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,22 @@ Describe "ResolveBuildManifest" {
$Expected | Should -Be (Join-Path ${Global:Test Root Path} "build.psd1")
}

It "Should throw when passed a wrong absolute module manifest" {
{InModuleScope ModuleBuilder { ResolveBuildManifest (Join-Path (Join-Path ${Global:Test Root Path} ERROR) ModuleBuilder.psd1) }} | Should -Throw
It "Returns nothing when passed a wrong absolute module manifest" {
InModuleScope ModuleBuilder {
ResolveBuildManifest (Join-Path (Join-Path ${Global:Test Root Path} ERROR) ModuleBuilder.psd1) | Should -BeNullOrEmpty
}
}

It "Should throw when passed the wrong folder path" {
{InModuleScope ModuleBuilder { ResolveBuildManifest (Join-Path ${Global:Test Root Path} "..") }} | Should -Throw
It "Returns nothing when passed the wrong folder path" {
InModuleScope ModuleBuilder {
ResolveBuildManifest (Join-Path ${Global:Test Root Path} "..") | Should -BeNullOrEmpty
}
}

It "Should throw when passed the wrong folder relative path" {
{InModuleScope ModuleBuilder { ResolveBuildManifest (Join-Path . ..) }} | Should -Throw
It "Returns nothing when passed the wrong folder relative path" {
InModuleScope ModuleBuilder {
ResolveBuildManifest (Join-Path . ..) | Should -BeNullOrEmpty
}
}

}