-
Notifications
You must be signed in to change notification settings - Fork 9.6k
tests(gather-runner): replace getMockedEmulationDriver w/ mock-commands #10136
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
Conversation
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.
Nice refactor, this is a ton more readable! 📖
}); | ||
|
||
connectionStub.sendCommand.findInvocation('Emulation.setDeviceMetricsOverride'); |
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.
Put an expectation around this?
expect(connectionStub.sendCommand.findInvocation('Emulation.setDeviceMetricsOverride')).toBeDefined()
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.
shouldn't be necessary FYI, findInvocation
does the assertion already
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.
I don't love the API for it, findInvocation
doesn't really imply that it is asserting behind the scenes. Seems like there should be two functions findInvocation
and expectInvocationExists
, or expect out here. But @connorjclark mentioned that this is used a lot, so might be a separate large scale change.
driver, | ||
settings: { | ||
extraHeaders: headers, | ||
extraHeaders, |
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.
quality
About to make this file typecheck'd - this was a refactor that needed to be done.