Skip to content

Conversation

@conwuegb
Copy link
Contributor

@conwuegb conwuegb commented Sep 19, 2025

Port tests from compose.directiveArgumentMergeStrategies.test.ts.

The tests could not be ported 1:1 since, in their original form, they are serving more as unit tests for the individual merge strategies than as integration tests. Instead of creating directives for each merge strategy, the Rust tests use existing directives as a proxy for the merge strategies themselves. At present, two merge strategies are not being used by existing directives so they were skipped in this port:

  • min
  • intersection

One particular test, "errors when declaring strategy that does not match the argument type", could not be ported using existing directives because a custom directive is required to be able to achieve that particular failure case. That test will be ported as a unit test in a future PR.

This change also adds a helper function for comparing CompositionHints.

An error was surfaced due to the additional error code checking added to composition::assert_composition_errors(...), so I've fixed it in this PR as well.


Checklist

  • PR description explains the motivation for the change and relevant context for reviewing
  • PR description links appropriate GitHub/Jira tickets (creating when necessary)
  • Tests added and passing
    • Integration tests

@conwuegb conwuegb requested review from a team as code owners September 19, 2025 20:45
@apollo-librarian
Copy link

apollo-librarian bot commented Sep 19, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: 14a3218cfdd0a34d973a5c81
Build Logs: View logs

@github-actions
Copy link
Contributor

@conwuegb, please consider creating a changeset entry in /.changesets/. These instructions describe the process and tooling.

@conwuegb conwuegb requested a review from dariuszkuc September 24, 2025 19:08
Copy link
Contributor

@duckki duckki left a comment

Choose a reason for hiding this comment

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

Looks good.
Approved with a minor suggestion.

@conwuegb conwuegb dismissed dariuszkuc’s stale review October 31, 2025 03:35

Decided in standup to forgo using rstest in order to simplify the port. All other requested changes have been made.

@conwuegb conwuegb enabled auto-merge (squash) October 31, 2025 03:54
@conwuegb conwuegb merged commit 0e63289 into dev Oct 31, 2025
15 checks passed
@conwuegb conwuegb deleted the conwuegb/fed-686 branch October 31, 2025 04:39
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.

5 participants