Stop using Scheduler.log to test double invocations #29008
Merged
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.
Stack:
consolecalls on additional Effect invocations due toStrictMode#29007Summary
In a follow-up, I want to dim console calls for effect invocations due to
StrictModejust like we do for render-time invocations due toStrictMode. This will automatically ignoreScheduler.logcalls during effect invocations caused byStrictMode(just like it does for render-time invocations due toStrictMode).That means we have to use other means of testing double invocations during
StrictMode. I used the same pattern we used for render-time double invocations: pushing to a log.Also used the opportunity to reduce the size of some log assertions to make future diffs readable. Git will not be able to correctly identify where a new log lines where added and think they got moved instead.
How did you test this change?
logare still the same in Dimconsolecalls on additional Effect invocations due toStrictMode#29007