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

Clone bound on Operation (breaking) and test helper methods #280

Merged
merged 6 commits into from
Oct 23, 2024

Conversation

StuartHarris
Copy link
Member

@StuartHarris StuartHarris commented Oct 21, 2024

  • Adds a Clone bound on the Operation trait so that we can examine the operation and still resolve its owning request later on — this is a breaking change.
  • Adds a take_effects method on Update to allow you to take effects off the Update that match the predicate
  • Adds a take_effects_partitioned_by method on Update to allow you to take effects off the Update that match the predicate and also the remaining effects that don't match
  • Updates all the crates' tests and the examples' tests to make use of these new testing helpers (and the ones already released in crux_core 0.9.0 and 0.9.1)
  • Note: the examples now reference local crates, but I'll change that after the helpers are published

@StuartHarris StuartHarris marked this pull request as ready for review October 22, 2024 15:36
@StuartHarris StuartHarris changed the title update tests Clone bound on Operation (breaking) and test helper methods Oct 22, 2024
Copy link
Member

@charypar charypar left a comment

Choose a reason for hiding this comment

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

Ahhh 💆🏻‍♂️

let request = &mut app
.update(Event::Post, &mut model)
.expect_one_effect()
.expect_http();
Copy link
Member

Choose a reason for hiding this comment

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

❤️

@StuartHarris StuartHarris merged commit 2b35e69 into master Oct 23, 2024
9 checks passed
@StuartHarris StuartHarris deleted the update-tests branch October 23, 2024 08:18
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.

2 participants