Skip to content

Instantly share code, notes, and snippets.

@nohwnd
Created March 21, 2017 09:28
Show Gist options
  • Save nohwnd/721743201b168216ffa37f8d67514541 to your computer and use it in GitHub Desktop.
Save nohwnd/721743201b168216ffa37f8d67514541 to your computer and use it in GitHub Desktop.
Run Pester in docker
$path = "C:\Projects\pester_nohwnd"
$volumePath = "//" + ($path -replace "\\","/" -replace "\:")
docker run --rm -v ${volumePath}:/home/pester microsoft/powershell --% cd /home/pester/; import-module ./pester.psd1; $result = Invoke-Pester -PassThru ; Export-Clixml -InputObject $result ./result.clixml
$result = $path + "/result.clixml" | Import-Clixml
$result.TestResult | Where Result -NE Passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment