Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
if ((Get-Command "mb" -ErrorAction SilentlyContinue) -eq $null)
{
"install mountebank globally"
& npm install --g mountebank
}
$block = { & mb --mock }
$mountebank = Start-Job -scriptblock $block
$mountebank
$mountebank.JobStateInfo
---- blah
Stop-Job $mountebank
if($failed -eq $true) {
throw "Unit test failed!"
}
Stop-Job $mountebank
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment