You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# these functions will be shared with the mock bootstrap function, or used in mocked calls so let's capture them just once instead of everytime we use a mock
2
+
# these functions will be shared with the mock bootstrap function, or used in mocked calls so let's capture them just once instead of every time we use a mock
Copy file name to clipboardExpand all lines: src/Pester.Runtime.ps1
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1589,7 +1589,7 @@ function Invoke-ScriptBlock {
1589
1589
# here we are moving into the user scope if the provided
1590
1590
# scriptblock was bound to user scope, so we want to take some actions
1591
1591
# typically switching between user and framework timer. There are still tiny pieces of
1592
-
# framework code running in the scriptblock but we can safely ignore those becasue they are
1592
+
# framework code running in the scriptblock but we can safely ignore those because they are
1593
1593
# just logging, so the time difference is miniscule.
1594
1594
# The code might also run just in framework scope, in that case the callback can remain empty,
1595
1595
# eg when we are invoking framework setup.
@@ -1919,7 +1919,7 @@ function Invoke-Test {
1919
1919
$state.PluginData=$PluginData
1920
1920
$state.Configuration=$Configuration
1921
1921
1922
-
# # TODO: this it potentially unreliable, because supressed errors are written to Error as well. And the errors are captured only from the caller state. So let's use it only as a useful indicator during migration and see how it works in production code.
1922
+
# # TODO: this it potentially unreliable, because suppressed errors are written to Error as well. And the errors are captured only from the caller state. So let's use it only as a useful indicator during migration and see how it works in production code.
1923
1923
1924
1924
# # finding if there were any non-terminating errors during the run, user can clear the array, and the array has fixed size so we can't just try to detect if there is any difference by counts before and after. So I capture the last known error in that state and try to find it in the array after the run
# todo: enable this warning for non wildcarded paths? otherwise it prints a ton of warnings for documenatation and so on when using "folder/*" wildcard
249
+
# todo: enable this warning for non wildcarded paths? otherwise it prints a ton of warnings for documentation and so on when using "folder/*" wildcard
250
250
# & $SafeCommands['Write-Warning'] "CodeCoverage path '$path' resolved to a non-PowerShell file '$($item.FullName)'; this path will not be part of the coverage report."
251
251
}
252
252
}
@@ -674,7 +674,7 @@ function Get-CoverageReport {
674
674
if ($null-ne$Measure) {
675
675
676
676
# re-key the measures to use columns that are corrected for BP placement
677
-
# also 1 column in tracer can map to multiple columns for BP, when there are assignements, so expand them
677
+
# also 1 column in tracer can map to multiple columns for BP, when there are assignments, so expand them
Copy file name to clipboardExpand all lines: src/functions/Describe.ps1
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -156,9 +156,9 @@ function Invoke-Interactively ($CommandUsed, $ScriptName, $SessionState, $BoundP
156
156
157
157
# there is a number of problems with this that I don't know how to solve right now
158
158
# - the scripblock below will be discovered which shows a weird message in the console (maybe just suppress?)
159
-
# every block will get it's own summary if we ar running multiple of them (can we somehow get to the actuall executed code?) or know which one is the last one?
159
+
# every block will get it's own summary if we ar running multiple of them (can we somehow get to the actual executed code?) or know which one is the last one?
160
160
161
-
# use an intermediate module to carry the bound paremeters
161
+
# use an intermediate module to carry the bound parameters
162
162
# but don't touch the session state the scriptblock is attached
163
163
# to, this way we are still running the provided scriptblocks where
164
164
# they are coming from (in the SessionState they are attached to),
if ($PesterPreference.Debug.WriteDebugMessages.Value) {
1158
1158
Write-PesterDebugMessage-Scope Mock -Message "Behavior is not from the target module $(if ($targettingAModule) { $TargetModule } else { '$null' }), skipping it:`n$(&$getBehaviorMessage$b)"
1159
1159
}
@@ -1192,7 +1192,7 @@ function Invoke-Mock {
1192
1192
}
1193
1193
}
1194
1194
1195
-
# if we are targetting a module use the behaviors for the current module, but if there is no default the fall back to the non-module default behavior.
1195
+
# if we are targeting a module use the behaviors for the current module, but if there is no default the fall back to the non-module default behavior.
1196
1196
# do not fallback to non-module filtered behaviors. This is here for safety, and for compatibility when doing Mock Remove-Item {}, and then mocking in module
1197
1197
# then the default mock for Remove-Item should be effective.
1198
1198
$behaviors=if ($targettingAModule) {
@@ -1210,7 +1210,7 @@ function Invoke-Mock {
1210
1210
$moduleBehaviors
1211
1211
}
1212
1212
else {
1213
-
# we are not targetting a mock in a module use the non module behaviors
1213
+
# we are not targeting a mock in a module use the non module behaviors
1214
1214
if ($null-ne$nonModuleDefaultBehavior) {
1215
1215
# add the default non-module behavior if we have any
0 commit comments