Repository navigation
[flutter_test] Adds method to mock EventChannels - #123726
Conversation
pdblasi-google
left a comment
There was a problem hiding this comment.
I really like what you've got here, it cleans things up quite a lot! Just a couple of nits and an API suggestion that I think will improve discoverability.
|
@pdblasi-google Should I just keep merging main into this until the Google Testing passes? |
|
If this one doesn't work, I'll escalate internally. I've been following a thread on the issues and I think they have been resolved. If you'd like, I have access to the "Update branch" button, so I can follow through on this one 'til it's able to get merged. |
|
The issue should be resolved and Google testing is working again. May require another rebase to trigger it again, though. |
|
auto label is removed for flutter/flutter, pr: 123726, due to This PR has not met approval requirements for merging. You have project association NONE and need 1 more review(s) in order to merge this PR.
|
|
auto label is removed for flutter/flutter, pr: 123726, due to Validations Fail. |
|
In case anyone wants to use this code before it's released to stable, I copied this code into the mock_event_channel package. When this PR is released to stable, just remove that package. |
[flutter_test] Adds method to mock EventChannels
Currently there is a way to mock MethodChannels, but no built in way to easily mock EventChannels. This PR adds a
setMockStreamHandlermethod to go along with the existingsetMockMethodCallHandler#26528
#38954
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.