-
Notifications
You must be signed in to change notification settings - Fork 254
Bug 1949126 - Improve the Rust based search engine selector tests Part 1 #7126
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
base: main
Are you sure you want to change the base?
Bug 1949126 - Improve the Rust based search engine selector tests Part 1 #7126
Conversation
|
This is the general gist of the structure I've been creating. Right now, the builder methods are not being called:
But I did test them out to create different custom types of full or minimal engine records. |
Standard8
left a comment
There was a problem hiding this 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
SearchEngineDefinitionas 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.
d6f4c3c to
097f1e4
Compare
|
I changed all tests in I will put up a different PR for the other tests in |
Standard8
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, this is looking very nice and a big improvement in readability & code size.
A couple of thoughts in-line.
097f1e4 to
804729e
Compare
Pull Request checklist
[ci full]to the PR title.