Skip to content

Commit

Permalink
🐛Test Adapter pipes were not working on Linux due to incorrect path (#55
Browse files Browse the repository at this point in the history
)

Resolves #30
  • Loading branch information
JustinGrote committed Aug 24, 2021
1 parent 79f52aa commit f776947
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion Scripts/PesterInterface.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,12 @@ function New-TestItemId {

# If this is a root container, just return the file path, since root containers can only be files (for now)
if ($Test -is [Pester.Block] -and $Test.IsRoot) {
return $Test.BlockContainer.Item.ToString().ToUpper()
[string]$path = $Test.BlockContainer.Item
if ($IsWindows -or $PSEdition -eq 'Desktop') {
return $path.ToUpper()
} else {
return $path
}
}

[String]$TestID = @(
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"items": {
"type": "string"
},
"default": ["**/*.[tT]ests.[pP][sS]1"],
"default": [
"**/*.[tT]ests.[pP][sS]1"
],
"markdownDescription": "Specify an array of [Glob Patterns](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options) of Pester test files for the adapter to scan, relative to your workspace. This is useful if you want to limit what test files or scanned, or you want to use a different test format than `.tests.ps1`. You must specify files, so if you want to include an entire folder, add a wildcard, for instance `Tests\\*.Tests.ps1`. **This is case sensitive!** Here is a case insensitive example: `[tT]ests\\*.[tT]ests.[pP][sS]1`"
},
"pester.hideSkippedBecauseMessages": {
Expand Down
2 changes: 1 addition & 1 deletion src/dotnetNamedPipeServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class DotnetNamedPipeServer implements Disposable {
} else {
// Windows uses NamedPipes where non-Windows platforms use Unix Domain Sockets.
// This requires connecting to the pipe file in different locations on Windows vs non-Windows.
return join(tmpdir(), pipeName)
return join(tmpdir(), `CoreFxPipe_${pipeName}`)
}
}

Expand Down

0 comments on commit f776947

Please sign in to comment.