-
Notifications
You must be signed in to change notification settings - Fork 274
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
Cleanup reset site kit code, change test accordingly. #2595
Conversation
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.
Looks great, just two small things to address for this to make sense when we come back to look at this in the future 😄
@@ -85,7 +85,7 @@ describe( 'core/site reset', () => { | |||
|
|||
// After a successful reset, `connection` should be `undefined` again. |
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 comment is no longer accurate.
// After a successful reset, `connection` should be `undefined` again. | |
// After a successful reset, `connection` state will be updated on the next page load. |
// After a successful reset, `connection` should be `undefined` again. | ||
const connection = await registry.select( STORE_NAME ).getConnection(); | ||
expect( connection ).toEqual( undefined ); | ||
expect( connection ).toEqual( { connected: true, resettable: true } ); |
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.
The name of this test should also be updated to be more accurate as well.
How about: it "resets connection on server only" ? I think this would be a bit more clear as to what is going on in combination with the updated comment.
Unfortunately GitHub won't let me suggest this change because it's out of range of the current changes.
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.
Sure. Sounds good.
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.
Super, thanks!
Summary
Addresses issue #2478
Relevant technical choices
reset
Checklist