-
Notifications
You must be signed in to change notification settings - Fork 75
improve: Unit tests for _fillRelayUSS() internal logic and fillRelayUSS() external function #388
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
Conversation
This function handles most of the fill logic and this PR adds useful test infrastructure for future testing
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
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.
LGTM! Two minor comments
| ] | ||
| ); | ||
| }); | ||
| it("fast fill emits correct FillType", async function () { |
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.
Just so I understand, does this fast fill replace the slow fill? Or is this a fresh fill?
If it's fresh, it would be good to add a test to be sure that we can overwrite the slow fill enum with a filled enum.
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.
A fast fill can replace a slow fill request or be a fresh fill. there is a specific test for this on line 400: "fast fill replacing speed up request emits correct FillType", PTAL!
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.
LGTM!
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.
LGTM - I have some comments but they also apply to the subsequent PR (#392), so I've left them over there.
The internal
_fillRelayUSSfunction handles most of the fill logic and this PR adds useful test infrastructure for future testing.This PR also includes unit testing logic specific to the external
fillUSSRelayfunction