Skip to content
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

test(labware-creator): more test refactoring #7853

Merged
merged 4 commits into from
Jun 8, 2021

Conversation

IanLondon
Copy link
Contributor

@IanLondon IanLondon commented May 28, 2021

Overview

This PR updates existing tests for the different sections in LC.

Changelog

  • test(labware-creator): more test refactoring

Review requests

  • Code review

Risk assessment

Low, test refactors in LC only

when(displayAsTubeMock)
.calledWith(formikConfig.initialValues)
Copy link
Member

Choose a reason for hiding this comment

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

@mcous and i had a long chat about expect vs expectCalledWith (i.e. mocks vs stubs). i documented the outcome that we prefer mocks over stubs in the frontend cookbook decision log

i dont think we need to be too pedantic about this, just thought i'd comment. what do u think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm kinda confused by the discussion and how it relates to that conclusion. The decision log says mocks would do expectCalledWith, but @mcous is arguing against expectCalledWith and it seems like you meet him there, so I don't get how you two concluded mocks over stubs it seems like you both said the opposite?

Copy link
Member

@shlokamin shlokamin Jun 8, 2021

Choose a reason for hiding this comment

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

ARGH I am so sorry @IanLondon I have been using the terms backwards, which is super confusing, 10000% my bad.

The decision is to prefer STUBS (pre canned answers, making no assertions when called in an unexpected way). Super sorry for using the wrong term, must have been really frustrating trying to understand what we meant :(

Copy link
Member

Choose a reason for hiding this comment

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

I fixed the decision log miswording

@codecov
Copy link

codecov bot commented Jun 2, 2021

Codecov Report

❗ No coverage uploaded for pull request base (edge@5bb265f). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             edge    #7853   +/-   ##
=======================================
  Coverage        ?   83.22%           
=======================================
  Files           ?      355           
  Lines           ?    22267           
  Branches        ?        0           
=======================================
  Hits            ?    18531           
  Misses          ?     3736           
  Partials        ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5bb265f...0697ca9. Read the comment docs.

@Kadee80 Kadee80 marked this pull request as ready for review June 8, 2021 14:51
@Kadee80 Kadee80 requested review from a team, Kadee80, shlokamin and smb2268 and removed request for a team June 8, 2021 14:51
Copy link
Contributor

@Kadee80 Kadee80 left a comment

Choose a reason for hiding this comment

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

🧸 LGTM - also doesnt look like it will interfere with @smb2268's Total Height PR

@Kadee80 Kadee80 merged commit 547bc6d into edge Jun 8, 2021
@Kadee80 Kadee80 deleted the lc_more-test-updates-2021-05-28 branch June 8, 2021 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants