-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add timezones selectors and tests #11131
Conversation
6bf1cfa
to
8e6442f
Compare
8e6442f
to
3b3e1e3
Compare
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.
I left a few minor notes, but this should be good to 🚢 after those have been tidied.
/** | ||
* Internal dependencies | ||
*/ | ||
import { isRequestingTimezones } from '../'; |
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.
We can go ahead and delete this file, since we're using the data/http layer and don't store this state explicitly
it( 'should return null if `timezones` aren\'t synced', () => { | ||
const state = { | ||
timezones: { | ||
rawOffsets: [], |
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.
I believe this should be an object
timezones: { | ||
rawOffsets: [], | ||
byContinent: {}, | ||
requesting: null |
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.
We can remove any requesting props from mock data
3b3e1e3
to
11adead
Compare
11adead
to
b483bc3
Compare
b483bc3
to
b691847
Compare
This PR depends on #10934.This PR add timezones selectors and also add tests for all of them.
Testing
Run client tests
state selectors