|
3 | 3 |
|
4 | 4 | # these are tests for the build module
|
5 | 5 |
|
6 |
| -import-module -force "./build.psm1" |
| 6 | +import-module -force "$PSScriptRoot\..\..\build.psm1" |
7 | 7 | Describe "Build Module Tests" {
|
8 | 8 | Context "Global.json" {
|
9 | 9 | BeforeAll {
|
10 |
| - $globalJson = Get-Content (Join-Path $PSScriptRoot global.json) | ConvertFrom-Json |
| 10 | + $globalJson = Get-Content (Join-Path "$PSScriptRoot\..\..\" global.json) | ConvertFrom-Json |
11 | 11 | $expectedVersion = $globalJson.sdk.version
|
12 | 12 | $result = Get-GlobalJsonSdkVersion
|
13 | 13 | }
|
@@ -105,7 +105,7 @@ Describe "Build Module Tests" {
|
105 | 105 | Context "Test result functions" {
|
106 | 106 | BeforeAll {
|
107 | 107 | $xmlFile = @'
|
108 |
| -<?xml version="1.0" encoding="utf-8" standalone="no"?> |
| 108 | +<?xml version="1.0" encoding="utf-8" standalone="no"?> |
109 | 109 | <test-results xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="nunit_schema_2.5.xsd" name="Pester" total="2" errors="0" failures="1" not-run="0" inconclusive="0" ignored="0" skipped="0" invalid="0" date="2019-02-19" time="11:36:56">
|
110 | 110 | <environment platform="Darwin" clr-version="Unknown" os-version="18.2.0" cwd="/Users/jimtru/src/github/forks/JamesWTruher/PSScriptAnalyzer" user="jimtru" user-domain="" machine-name="Jims-Mac-mini.guest.corp.microsoft.com" nunit-version="2.5.8.0" />
|
111 | 111 | <culture-info current-culture="en-US" current-uiculture="en-US" />
|
@@ -133,8 +133,8 @@ Describe "Build Module Tests" {
|
133 | 133 | '@
|
134 | 134 |
|
135 | 135 | $xmlFile | out-file TESTDRIVE:/results.xml
|
136 |
| - $results = Get-TestResults -logfile TESTDRIVE:/results.xml |
137 |
| - $failures = Get-TestFailures -logfile TESTDRIVE:/results.xml |
| 136 | + $results = @(Get-TestResults -logfile TESTDRIVE:/results.xml) |
| 137 | + $failures = @(Get-TestFailures -logfile TESTDRIVE:/results.xml) |
138 | 138 | }
|
139 | 139 |
|
140 | 140 | It "Get-TestResults finds 2 results" {
|
|
0 commit comments