Skip to content

Conversation

connorjclark
Copy link
Collaborator

About to make this file typecheck'd - this was a refactor that needed to be done.

Copy link
Member

@exterkamp exterkamp left a 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');
Copy link
Member

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()

Copy link
Collaborator

@patrickhulce patrickhulce Jan 10, 2020

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

Copy link
Member

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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quality

@connorjclark connorjclark merged commit 03ef2bc into master Jan 11, 2020
@connorjclark connorjclark deleted the gather-runner-mock-commands branch January 11, 2020 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants