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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add pending interceptor check functions to mock agent #1358
feat: add pending interceptor check functions to mock agent #1358
Changes from all commits
00dd6c5
e2419f7
becb271
bdab4bc
b8c8a76
adfb8e3
b8c1a05
65bcea9
14517ab
6af598d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the
pluralizer
API ends up being a little more complicated than it maybe needs to now that we only track one array (instead ofconsumed
,tooFewUses
, andpersistent
as we did before), but I think it's still a nice little utility.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we default
times
to1
here so we don't have to do null checking everywhereThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All interceptors are
pending
as they are first registered. I thinkconsumed
belongs here as well (and not inbaseData
), but… meh. I suppose it might be possible to register an interceptor that should not bepending
by registering it with.times(0)
, but that sounds too illogical to account for.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now increase
timesInvoked
instead of decreasingtimes
(which is now constant).(Is
invoked
a good name, or would something liketimesIntercepted
be better?)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consumed
is the same as before, butpending
is new.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we moved the header name mapping here so that the formatter gets proper lowerCamelCased variable names passed in. I think that makes it less annoying to build a new formatter. Otherwise, this does the same thing as before