Repository navigation
chore(deps): update dependency pester to v6 - #146
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/pester-6.x
branch
from
December 5, 2026 01:47
9e8c64d to
d156c97
Compare
renovate
Bot
force-pushed
the
renovate/pester-6.x
branch
from
December 5, 2026 10:15
d156c97 to
1e77ce9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
5.9.1→6.3.0Release Notes
Pester/Pester (Pester)
v6.3.0Compare Source
Pester 6.3.0
-Because-AggregateNew features
Say why a test is skipped, with
-Because-Skipsaid that a test was skipped and never why. NowIt,DescribeandContexttake-Because:The reason is in the output, on the result object, and in the NUnit3 and JUnit reports:
The parameter is
-Becauseand not-Reasonso that the whole module uses one word for why:Set-ItResult -BecauseandShould -Becausealready did. The result property is.Reason, which is the word NUnit and JUnit use for it.Set-ItResult -Becausefills the same property, so a test skipped from inside its own body reports its reason the same way a test skipped by-Skipdoes.Mock a command that aggregates the pipeline, with
-AggregateA command that takes pipeline input and returns once from its
endblock could not be mocked.MockWithruns once per piped item, so the mock returned one object per input where the real command returns one, andShould -Invokecounted one call per item.Mocktakes-Aggregatenow. The process block only collects the pipeline, andMockWithruns once from the end block over everything it collected.Mock inner { "FOO" } -Aggregate @(outer).Count # 1The collected input is piped into
MockWith, so it is there as$input, andMockWithcan have its ownbegin,processandendblocks, like the real command.Should -Invokecounts one call per pipeline, and the parameter filter sees the whole collected input bound to the pipeline parameter, so you can assert on all of it at once:All mocks for one command have to be the same kind. A per-call mock records one call per item and an
-Aggregatemock records one call per pipeline, and mixing the two for the same command would put both granularities in the call history, whichShould -Invokecannot count coherently. It is rejected when the second mock is defined. The check looks at the current scope only, so a parent-scope-Aggregatemock and a child-scope per-call mock for the same command get past it, and then the count underShould -Invoke -Scope Describeis confusing.Piping to a mocked native application cannot be asserted on by parameter name, a native application has no
ValueFromPipelineparameter so nothing binds by name. The input is still collected and piped intoMockWith.Stricter checks and clearer failures
A bad configuration is an error, and it names every problem
6.2.0 started checking for configuration mistakes, but it treated the two kinds differently. A value an option cannot use threw. A key the configuration has no option for only warned, and only from
Invoke-Pester, soNew-PesterConfiguration -Hashtableand a plain[PesterConfiguration]cast said nothing at all. A warning scrolls past in CI and the run continues on the default, which is the silent failure the checks were added to stop.Both kinds are errors now, both when the hashtable is converted, and one conversion reports every problem:
The suggestion is the closest known name within one edit per four characters, by Levenshtein distance, so
ParalelfindsParallel,RunnfindsRun, andZzzfinds nothing and says so. A single problem stays the sentence it already was, with no list around it, so every message that exists today is unchanged.There is no opt-out. The only real argument for not throwing is forward compatibility, a config written for a newer Pester running on an older 6.x, and a configuration hashtable has nothing else it should be carrying. Say the word if you need one.
Assertions stop passing on input they cannot judge
An assertion that finishes without asserting anything is worse than one that fails, because the test goes green and nobody looks at it again. I went through all 41 assertions in
src/functions/assertlooking for that one shape, then called every one of them with input it cannot judge and looked at which ones passed.An empty filter passed:
An empty scriptblock produces no output, and no output was taken to mean the filter asserted on the item and did not throw. Those are not the same thing, and a scriptblock with no statements cannot say anything about any item.
A falsy result of another type passed:
The result counted as a failure only when it was exactly the boolean
$false. The documented contract is that the filter returns true or does not throw, so the result is judged on whether it is true, whatever its type. A truthy value of another type still passes.A date assertion compared strings:
Should-BeAfterandShould-BeBeforehave no dispatch on type. They compare with a relational operator and let PowerShell decide what that means, and with a string on the left PowerShell compares as strings, where'a string'sorts after a formatted date.-Expected 42went wrong one level up, in the binder: the parameter was declared[DateTime], so42became 42 ticks, which is the year 1, and every real date is after the year 1. Both parameters are checked by the assertion itself now. A[datetimeoffset]still works, it is not a[datetime]but compares with one.And an expected value that is neither a type nor a type name passed:
Both say what is actually wrong now.
A mock failure points at the call site
The "Performed invocations" list in a
Should -Invokefailure printedfrom <file>:<line>for every recorded call, and that line was the one theMockwas defined on, not the one that made the call. Every entry showed the same line, so the location could not tell the listed calls apart, which is the one thing it is there for. The 6.0.0 release notes example has it too.Before:
and
demo.Tests.ps1:4is theMockline. After, the lines are the two calls.Fixes in the experimental parallel runner
Every parallel worker gets its own session state
Run.Parallelbuilt its workers withRunspaceFactory.CreateRunspacePool, which takes oneInitialSessionStateand hands that same instance to every runspace in the pool.Import-Moduleadds a module'sFormatsToProcessentries to that collection and then enumerates it, so one worker enumerated while another added andList<T>threwCollection was modified; enumeration operation may not execute. Pester declaresFormatsToProcessitself and every worker imports Pester, which is why a suite whose own modules have no format files hit it too.RunspacePoolhas no way to give each runspace a session state of its own, soInvoke-InRunspacePoolkeeps its own pool now, one runspace per slot, each from its own session state, up toThrottleLimit.A parallel run prints what a sequential run prints
Two things made
Run.Parallelprint something other than a sequential run of the same files.Every warning was printed twice, and three times for the workers that started first. The runspace pool is created with the caller's
$Host, so a worker'sWrite-Warningalready reaches the console while the worker runs, and the loop that re-emittedStreams.WarningafterEndInvokeprinted it again. Errors keep their re-emit, they only land inStreams.Errorand never reach the host on their own.And a worker ran with default preference variables. A fresh runspace has
WarningPreference = 'Continue'andVerbosePreference = 'SilentlyContinue'whatever the caller was running with, so a caller who had silenced warnings still got them and a caller who had asked for verbose output got none. The worker runspaces take the caller's preferences now.Potentially breaking changes
Every entry here can turn a green suite red, or change what a report consumer reads, when the suite relied on the old behavior. Most of them come from the assertion audit above. Each one of those is a case where something passed, or reported a value, without being able to judge the input, so a test that relied on it was not testing what it looks like it was testing. The entries at the end of the list are not from the audit.
Should-BeCollectioncompares the items in order. It passed when both collections held the same items in a different order:The whole comparison sat inside
if (-Not $InOrder), and$InOrderwas not a parameter and was never assigned, so the any-order branch always ran and the in-order branch was never written. In order is the default now and-IgnoreOrderopts out, the wayShould-ContainCollectionalready works.A configuration key that is not an option throws. It used to warn, from
Invoke-Pesteronly.GetUnknownKeys()is gone with the warning that was its only caller.Should-AllandShould-Anyreject an empty filter, and judge the result on truthiness.{ },{ 0 }and{ '' }fail now.Should-HaveTypeandShould-NotHaveTypereject an expected value that is neither a type nor a type name.Should-BeAfterandShould-BeBeforeneed a[datetime]or a[datetimeoffset]on both sides. A string, a hashtable, or a number for-Expectedfails instead of being compared as text or converted to ticks.A fluent time string has to be the whole string, and the unit has to be spelled out. The pattern had no anchor at the end and matched the unit by its first letters:
1month1months1 week ago1sfoo1 s junk1monthis the one that matters:monthstarts withm, so a bound of one month was read as one minute and nothing was said about it. Everything that parsed before still parses.Should-BeFasterThanandShould-BeSlowerThanno longer write the measured scriptblock's output.& $Actualput whatever the scriptblock wrote into the assertion's own output, so$out = { 1, 2, 3 } | Should-BeFasterThan 30sgave$out.Countof 3. The[timespan]branch wrote nothing, and an assertion should write nothing.The default NUnitXml report wraps a loose test in a suite when its block also has child blocks.
resultsTypein the NUnit 2.5 schema is anxs:choice, soresultsholds eithertest-suitechildren ortest-casechildren and never both. ADescribeholding aContextplus a strayItproduced both and the report stopped validating. Those reports were already invalid and the schema leaves no narrower fix, but a consumer reading//test-suite/results/test-casewill no longer find those tests.NUnit2.5is an alias forNUnitXml, which is the defaultTestResult.OutputFormat, so this is the default report.The JUnit
classnameis the path of the blocks, not the path of the file. CI reports showclassnameas the suite name, so the suite name used to be an absolute path including whatever folders the CI runner happens to use. The file is in a newfileattribute, relative toRun.RepoRootand with forward slashes:namekeeps the full path of the test, because CI reports do not show a tree view.Run.ShuffleSeedreproduces one file's order on its own. One[System.Random]was built from the seed for the whole run and consumed in sequence, the file order first and then each file's blocks and tests, so a file's order depended on how many values had already been drawn. Rerunning one failing file with the seed from CI, which is the point of having a seed, gave a different order and the failure did not have to come back. Each file has its own generator now, which means the order a given seed produces is not the order it produced in 6.2.0.A template keeps its text when there is no variable to put in it.
Describe "<Foo>"with no$FooprintedDescribing $null, and an invalid template like<Foo/Bar>printed aParseExceptionshowing Pester's own generated expression and the test did not run at all. Both print the template as written now, and the test runs.Pester 6 refuses to load when Pester 4 or older is already loaded. It used to load next to it, and the run that followed printed two summaries that disagreed, wrote
TestGroups stack corruptedas a non-terminating error, and left Pester 4's result object reporting zero tests. A pipeline that decides from$r.FailedCount -eq 0calls that green. Nobody imports both on purpose: a Pester 4 run reaches a file that calls a Pester 5 command, such asBeforeDiscovery, and PowerShell autoloads this version fromPSModulePathin the middle of the run. The import throws now, and the message names that cause.A mock assertion in a
DescribeorContextbody fails discovery.Should -InvokeVerifiableplaced directly in a block body runs during discovery, where no mock is set up and nothing has been called, so the list of verifiable mocks was empty, "all verifiable mocks were called" was true, and the run was green with the assertion never asserting anything. Pester 4 ran that body after the tests in the block, so a file moved from Pester 4 has the assertion there by construction. Move it into anAfterAll, anAfterEach, or theItthat calls the mock.Should -Invokein the same position already failed, but on the command name, which pointed at the wrong thing.Inside a mock body, the command being mocked means the real command. It used to call the mock again, and recursed until PowerShell's call depth limit, which took about twelve seconds and ended in
ScriptCallDepthException. Calling the real command from inside the mock body is how you replace the mock fall-through that Pester 6 removed, and that recipe works as written now, with or without-ModuleName:Every other mock still applies inside the body and still counts. The body's call to the command it mocks is not counted as a call on that mock.
Should-Throw -AllowNonTerminatingErrorno longer returns the errors it ignores. The redirect sat on an assignment, where errors escape it, so the ignored errors landed in the assertion's own output and came back next to the error record it reports:The help for the switch said the assertion passes if a non-terminating error is thrown, which is the opposite of what the switch does. It runs the script block with
$ErrorActionPreference = 'Continue', so non-terminating errors are ignored and only a terminating error satisfies the assertion. The help says that now, and says which preference the script block runs with.A
<token>in a test name renders the value, not the type. The name is written by the same formatter that writes assertion messages, and for a value it does not walk it prints the type, which is the same string for every value of that type. Three versions came out with one name three times. A type that has a short string form of its own is asked for that form first:[version]'1.2.3'[version]1.2.3[uri]'https://example.com/a'[uri]https://example.com/a[pscustomobject]@{A=1;B='two'}[PSObject]@{A=1; B=two}Test names change with it, so a report compared against 6.2.0 shows those tests as renamed.
Other improvements and fixes
Invoke-Pesterno longer overwrites the caller's$pand$d.Invoke-InNewScriptScopedot-sourced its wrapper, which is bound to the caller's session state, so the wrapper's parameters were bound in the caller's scope andprivate:did not prevent it. A script that kept its own path in$pand wrote to it after running tests wrote into Pester's installation instead. The wrapper is called with&now, the wayInvoke-Filealready called its own.Run.RepoRootis resolved against the current location. Only the code coverage plugin made it absolute, so without coverage it reached the setup chain as it was,GetFullPathresolved it against the process working directory, and everyPester.BeforeContainer.ps1silently did not apply..gitis a file instead of a directory. In a git worktree, in a submodule, and in a clone made with--separate-git-dir,.githolds the path to the real git directory, so the walk went past the actual root and fell back to the location the run started from. That moved thePester.BeforeContainer.ps1cascade and the prefix the coverage report strips off its paths, and nothing reported it.-Verifiablein aDescribethat you then override in anItcould never passShould -InvokeVerifiable: the inner mock handled the call, but the outer behavior was still collected and reported as never invoked. A verifiable mock that is not shadowed by a closer default mock is still required.Should-Throwreports the exception the test threw under a non-English UI culture. It recognized theInvokeWithContextwrapper by matchingInvokeWithContextin the exception message, and PowerShell quotes the method name with the quotation marks of the current UI culture, so under de-DE the match failed and the assertion reported the wrapper instead.Should-BeEquivalenton aFileInfoor aDirectoryInfofails in the usual milliseconds instead of 12 to 30 seconds. The time went into one verbose message: listing the properties the actual object has and the expected one does not formatted eachPSPropertyInfo, which reads itsValue, so it walkedDirectory,Parent,Root,PSDriveandPSProviderand formatted the object graph behind each one.Should-BeEquivalentfailure, and only the leaf differences are reported.Format-Hashtable2did not take-Prettyat all, so it joined its entries on one line while objects and collections were indented, and the hashtable comparer recorded a difference at every level it walked through, prepending the whole thing to the differences below it.-ForEachis a mistake in the test data and the output made it look like a crash in Pester, with an internal stack trace that ignoredOutput.StackTraceVerbosity.Invoke-Pesterinside a parallel worker writes to its own caller instead of to the worker's output tape.about_PesterConfigurationsays howRun.RepoRootaffects the paths in the reports.New-MockObject -Propertieskeeps its properties when the mock is read throughSelect-Object -ExpandProperty. The properties were added withPSObject.Properties.Add(), and passing a value to a .NET method unwraps itsPSObject, soSelect-Objectwrapped the bare value again and the new wrapper did not see them. A nested mock read through two-ExpandPropertysteps returned$null.Shouldwritten without dashes says what is wrong. Pester 3 and 4 wrote the operator asShould Be, and a suite pinned to Pester 4 that goes straight to 6 gotParameterBindingException: Parameter set cannot be resolvedwith nothing about the syntax. Pester 5 had this message and it was removed on the assumption that a Pester 6 user arrives from Pester 5 and has seen it once already. The message is back, it names the operator you wrote, and it links the migration guide.-ForEachsays whether it got$nullor an empty array. The two are different mistakes with different fixes.$nullis usually a variable assigned inBeforeAll, which does not exist yet while-ForEachis evaluated, because that happens during discovery, so the fix isBeforeDiscovery. The old message suggested-AllowNullOrEmptyForEach, which keeps those tests from ever running.RequiredAssemblyVersionfrom the manifestPrivateData, which PowerShell fills in only for an import through the manifest, soPrivateDatawas empty, the minimum was$null, and[version]"5.9.1.0" -lt $nullis$false. The guard silently did nothing, which is the VSCode case its own message describes.BeforeAll, so three failing iterations of the same block all readTest <_>with nothing to tell them apart.DetailedandDiagnostic. A setup that throws fails every test under it, those tests never run, so nothing printed them, while the result object and the reports had them as failed all along.Debug.ShowStartMarkersprints the expanded name of a data-driven test. The marker is written before the setup that expands the name, so it printed[|] Iteration <_>...for every iteration.Full Changelog: pester/Pester@6.2.0...6.3.0
Thank you
Thank you to everyone who filed issues and sent fixes.
@GioAbq for the
$pand$dfix, @TohruSu for the relativeRun.RepoRootfix, @fflaten for migrating the test suite to the v6 assertions, @dirtyvanity for theNew-MockObjectfix, @dleontev for theRun.RepoRootdocumentation, and @corbob, whose work on the skip reason this release finally finished.@AlonGvili for asking for the skip reason in the first place, @fsackur for the mock that could not aggregate the pipeline, @rcarpenter79 for the invalid NUnit report, @SESEric for the shadowed verifiable mock, @kborowinski for the duplicated parallel warnings, @ReneRebsdorf and @jazzdelightsme for the parallel import failure, @iRon7 for the templates, @LethiferousMoose for
Should-BeCollectionignoring item order, @briantist for the JUnitclassname, @frottke for theShould-Throwculture bug, @chrisdent-de for the mock object losing its properties, @indented-automation for the-AllowNonTerminatingErrorhelp saying the opposite of what the switch does, @davidmatson for the start markers and for the tests nobody printed, and @crlgb for the data-driven block name.Questions?
Open an issue or start a discussion.
v6.2.0Compare Source
Pester 6.2.0
Pester.BeforeContainer.ps1grew from one file at the repository root into a chain thatfollows your folder structure, so unit tests and integration tests can each have their own
setup without repeating it in every test file. A block can have more than one
BeforeAllnow, so setup can be grouped by what it sets up instead of merged into a single block.
Should-BeStringprints a real diff when a long string does not match. The configurationnow tells you when you handed it a value it cannot use, instead of quietly ignoring it. And
the experimental parallel runner works on Windows PowerShell 5.1, which is the slowest
edition and the one that needed it most.
Should-BeStringshows you the whole diffWhat's new?
Setup that follows your folders
6.1.0 shipped
Pester.BeforeContainer.ps1, a setup file that runs before every test file,including in parallel runs where each worker starts from a clean runspace. Only the one at
Run.RepoRootwas used though, so a repository where unit tests and integration tests needdifferent setup had to cram both into that single file, or repeat the setup in every test
file.
Now every
Pester.BeforeContainer.ps1fromRun.RepoRootdown to the test file's own folderis applied, outermost first:
The root file holds common setups and teardowns that every test needs:
tests/holds the helpers only tests use, and each suite holds what only it needs:A test file in
tests/unitgets the root setup, thetests/setup and thetests/unitsetup, in that order. A test file in
tests/integrationgets the root setup, thetests/setup and
real-sql. It does not getin-memory, whichever file happens to run first:The setup files are dot-sourced into the container's own scope now, not into the run session
state. That is what makes the folders actually scope anything. Before this, setup dot-sourced
for one file stayed visible to every container after it, so a file in
tests/integrationwould silently inherit whatever
tests/unithad set up, and the result depended on run order.A folder opts out of everything above it with
#pester:no-inherit, the same meaningroot = truehas in an.editorconfig. Useful for something like doc tests that need theirown cheap setup and should not pay for the expensive one:
The whole chain works in a sequential run and in a parallel run. In parallel the chain is
resolved once in the parent and the paths are handed to the workers, because a worker is a
separate runspace and cannot share the cache. The files run before every container, so what
they do has to be safe to run more than once.
Run.RepoRootis where the chain starts, and it is found for you by walking up from thedirectory you are in until a
.gitfolder shows up. That walk used to start from the processworking directory, which
Set-Locationdoes not change, so a session that started somewhereelse and then changed directory into a repository got a root pointing at the old place and
none of the setup files applied, with nothing to say why. It starts from the location the
session is actually in now. Set
Run.RepoRootyourself when your tests do not live in a gitrepository, or when the root is somewhere other than where
.gitis.Which files apply is a property of the directory, not of the container, so the run shares one
cache keyed by directory. Each directory is checked on disk once per run and each setup file
is tokenized once per run, however many test folders sit below them. On a tree with 60 test
folders and a 26 KB root setup file that is 23.6 ms instead of 845 ms.
A container reports which setup files applied to it, outermost first, in the order they ran.
The list is on the container in the result object, as
BeforeContainerFile:D.Tests.ps1sits under a folder marked#pester:no-inherit, so only its own file applied. Thefolder tree cannot tell you that, which is why the list is on the result.
Requested by @johlju in #2772, where he
estimated it removes around a thousand lines of duplication in SqlServerDsc.
See Behavior changes below, there are three.
Should-BeStringshows you the whole diffComparing a long string used to give you a caret under the first character that differed.
That answers "one thing changed". Comparing a snapshot, a rendered template or a config file
is usually "many things changed", and a scan that stops at the first difference makes you fix
them one run at a time.
Should-BeStringnow finds every region that differs and prints them with context:Expected line numbers on the left, actual line numbers on the right. They are separate columns
so it stays readable when lines are added or removed and the two sides stop lining up:
Only the lines that differ are expanded, so a tab or a trailing space is visible without
turning the surrounding context into escape codes.
Fixes #2951 and
#3006.
The configuration rejects values it cannot use
A configuration value of the wrong type used to be ignored, and a misspelled key was ignored
too, so the run just did not do what you asked and nothing said why. This bites hardest with
values that come out of a JSON or
psd1file, because those arrive as strings.A value the option cannot use now throws while the configuration is built:
Nobody writes a value the option cannot read on purpose, so there is nothing to lose by being
strict here. An
intwhere adecimalis expected is still accepted, and a key that ispresent but
$nullstill means "not set", so an unset variable does not throw(#2219).
An unknown key is collected instead of thrown on, because a hashtable may carry keys meant for
something else, and
Invoke-Pesterwarns about all of them at once:The warning is emitted once, in
Invoke-Pester. That is the funnel for every path(
-Configuration @{ },New-PesterConfiguration -Hashtable, and$PesterPreference = @{ }in a test file), so nothing is missed and nobody gets the same warning twice. A bare
[PesterConfiguration]@{ }outside a run stays silent, andGetUnknownKeys()is there if youwant to look.
Fix #2975, option 3 from the issue, which
@fflaten picked.
Failures point at the line that caused them
An error thrown from inside a Pester function lost its whole stack trace, so a fair number of
failures printed a message and no location at all. And an assertion that rejected your input
said "this assertion" instead of naming itself.
On 6.1.0 the first two have no location, and the third points at the assertion but not at the
call, so in a bigger suite you do not know which of the calls to
Test-Thingfailed:Now:
A
BeforeAllthat throws reports the real error too. It used to report "A 'break' or'continue' statement with a label that does not match any enclosing loop escaped from your
code", and the real exception was discarded, so someone whose setup failed because a database
was down was told their code has a misspelled loop label:
Fixes #2977,
#2980, and the escaped-
breakreport.Experimental features
These are off by default and may still change. Try them and tell us what breaks.
Parallel runs on Windows PowerShell 5.1
Run.Parallelwas built onForEach-Object -Parallel, which only exists on PowerShell 7, soWindows PowerShell 5.1 warned and ran sequentially. 5.1 is the slowest leg in our own matrix
and it decides how long a build takes, so it is the edition that needs this most.
Both editions now go through a runspace pool that 5.1 and 7 both have. No new dependency,
and nothing changes in how you turn it on:
Three things
ForEach-Object -Paralleldid that the pool does not, none of which you have tothink about, but they explain the shape of the change:
$using:is its feature, not the runspace API's, so the worker takes named parametersinstead. Same process either way, so the values still cross as live objects.
runspace affinity crosses.
worker sets the location from the parent and relative paths in test files keep resolving.
Passing the values as arguments instead of capturing them with
$using:is a tip @DarkLite1gave in #2971. Thanks.
The parallel tests no longer skip their assertions on 5.1, they run the same ones as on 7
including the console output snapshot.
A parallel run no longer loses a file quietly
Four files went into a
Run.Parallelrun on CI and three came back. The missing file was notfailed, skipped or errored, it was not reported at all, and the run looked green with one test
fewer than it should have had.
Invoke-TestInParallelfiltered worker results to guard against stray pipeline output, andthat filter cannot tell stray output from a worker that died before it returned its result.
Nothing afterwards compared the number of results to the number of files sent, and sorting put
the survivors back in discovery order, so the output looked like a normal shorter run.
The counts are compared after the filter now, and a short result set throws and names the files
that went missing. Any worker that dies for any reason costs a whole test file, so this does
not depend on why it died.
Reporting a failed worker also no longer aborts the rest of the run.
Invoke-InRunspacePoolreports a worker that threw with
Write-Errorand keeps going, because the remaining filesstill have results worth reporting.
Write-Errorobeys the caller's$ErrorActionPreferencethough, so a caller running with
Stop, which CI scripts commonly do, got a terminating error,the loop aborted on the first failing file, and everything that had alread
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.