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 December 11, 2025 01:05
@mandysGit
Copy link
Contributor Author

This is the general gist of the structure I've been creating.
I'm thinking of making builder methods for the SearchEngineDefinition as well later.

Right now, the builder methods are not being called:

  • pub fn identifier
    
  • pub fn name
    
  • pub fn search_url
    

But I did test them out to create different custom types of full or minimal engine records.
Let me know what you think or which parts should be changed.
If it generally looks good, I'll continue with the pattern for the rest of the tests.

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.

This is the general gist of the structure I've been creating. I'm thinking of making builder methods for the SearchEngineDefinition as well later.

Thank you, I like the approach here.

I think the one improvement I'd suggest is to always require an identifier to be passed in for the engines. For example the test would read as:

                test_helpers::EngineRecord::full().build(),
                test_helpers::EngineRecord::minimal().build(),

Although we can probably assume in that order they would be 1 and 2, if I change the order do the ids change as well? Hence, I think it would be better to pass the identifier in - we require this for the existing JS test utils, so I think its fine to reflect that here.

Marking as request changes, so I'll get notified/a signal when there's updates.

@mandysGit mandysGit force-pushed the refactor-rust-selector-tests-part-1 branch from d6f4c3c to 097f1e4 Compare December 24, 2025 00:28
@mandysGit mandysGit requested a review from Standard8 December 24, 2025 00:29
@mandysGit
Copy link
Contributor Author

I changed all tests in selector.rs

I will put up a different PR for the other tests in filter.rs. This refactor is already very big.

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