Skip to content

Conversation

@mandysGit
Copy link
Contributor

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

@mandysGit mandysGit requested a review from Standard8 January 1, 2026 03:48
@mandysGit mandysGit changed the base branch from main to refactor-rust-selector-tests-part-1 January 1, 2026 04:45
@mandysGit mandysGit force-pushed the refactor-rust-selector-tests-part-2 branch from ef5588b to e5ba085 Compare January 1, 2026 04:48
Copy link
Member

@Standard8 Standard8 left a comment

Choose a reason for hiding this comment

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

Thanks for working on this. There's a few comments in-line to address.

From the patch structure, it is pretty hard to review. The problem appears to be the moves/re-ordering of the tests within the file - this makes the differences hard to read and find. It would probably have been better to do the moves of the tests in a separate commit, and then in theory the diffs would be simpler here as it would just be the actual changes.

However, as I know there's been a lot of work in this, and it is test-only, I'm not going to ask for that here, but it would be something to bear in mind in future to make it easier for reviewers.

thiserror = "2"
uniffi = { version = "0.29.0" }
firefox-versioning = { path = "../support/firefox-versioning" }
pretty_assertions = "1"
Copy link
Member

Choose a reason for hiding this comment

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

We did originally use pretty_assertions, but it was removed in #6864. I suggest discussing with the application-services-monorepo team about what the options might be.

This could be something that we remove from the patch for now, and add it in later if we get clearance.

#[cfg(test)]
use std::collections::HashMap;

pub static ENGINE_BASE: Lazy<JSONEngineBase> = Lazy::new(|| JSONEngineBase {
Copy link
Member

Choose a reason for hiding this comment

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

I wonder that as this (and the other related ones) are in the test file now - should we name it better, e.g. JSON_ENGINE_BASE or something?

});

#[cfg(test)]
pub struct ExpectedEngineFromBase {
Copy link
Member

Choose a reason for hiding this comment

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

We might need a way to visually link this to ENGINE_BASE via its name, i.e. ExpectedFromJSONEngineBase or something like that.

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