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

Rename expect(worker:producingOutput:) to be more clear about what it is asserting #323

Merged
merged 1 commit into from
Apr 8, 2025

Conversation

amayers
Copy link
Contributor

@amayers amayers commented Mar 6, 2025

When I first saw tests that used this function, I thought it was asserting that the worker passed in, matches the workflow.worker (which it does do), and that it was asserting that producingOutput == workflow.worker.output (which it does NOT do). Instead, neither of the workers are ever run. The producingOutput is used as mock output. So renaming these to make it more clear what is going on.

Checklist

  • Unit Tests
  • UI Tests
  • Snapshot Tests (iOS only)
  • I have made corresponding changes to the documentation

@amayers amayers requested a review from a team as a code owner March 6, 2025 17:39
@CLAassistant
Copy link

CLAassistant commented Mar 6, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@jamieQ jamieQ left a comment

Choose a reason for hiding this comment

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

generally lgtm – left some minor comments & i think we should alter the name slightly per feedback from other folks

@amayers amayers force-pushed the amayers/worker_expect branch from a5f5592 to 9655f00 Compare April 7, 2025 14:55
@amayers amayers force-pushed the amayers/worker_expect branch 2 times, most recently from 216f44b to f4aa789 Compare April 8, 2025 13:28
When I first saw tests that used this function, I thought it was asserting that the `worker` passed in, matches the `workflow.worker` (which it does do), but then I thought it was asserting that `producingOutput == workflow.worker.output` (which it does NOT do). Instead, neither of the workers are ever run. The `producingOutput` is used as mock output. So renaming these to make it more clear what is going on.
@amayers amayers force-pushed the amayers/worker_expect branch from f4aa789 to 3cc04e0 Compare April 8, 2025 14:17
Copy link
Contributor

@jamieQ jamieQ left a comment

Choose a reason for hiding this comment

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

lgtm – thanks for your patience & perseverance on this!

@jamieQ jamieQ merged commit 01389e2 into square:main Apr 8, 2025
7 checks passed
@amayers amayers deleted the amayers/worker_expect branch April 8, 2025 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants