Skip to content
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

refactor(react-intl): update to v3 #1482

Merged
merged 6 commits into from
Aug 13, 2019
Merged

refactor(react-intl): update to v3 #1482

merged 6 commits into from
Aug 13, 2019

Conversation

louh
Copy link
Member

@louh louh commented Aug 11, 2019

No description provided.

import { PELIAS_HOST_NAME, PELIAS_API_KEY } from '../../app/config'
import { setMapState } from '../../store/actions/map'

class GeoSearch extends React.Component {
static propTypes = {
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a huge deal, but I it looks like in v3 react-intl exports an [IntlShape](https://github.com/formatjs/react-intl/blob/master/docs/Upgrade-Guide.md#typescript-support), could we use that here with PropTypes.shape?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't work, and I suppose that's to be expected — I don't think TypeScript and PropTypes are compatible, as they're totally different systems for typechecking.

@@ -19,30 +18,33 @@ describe('StreetMetaWidthContainer', () => {
expect(wrapper.asFragment()).toMatchSnapshot()
})

it('updates street label on selection change', () => {
it.skip('updates street label on selection change', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wanna double check - are we skipping this test and the one below it on purpose?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are skipped on purpose for now, since we need to rewrite these tests for them to pass. (As discussed, this component's interaction is a great candidate for Cypress.)

Copy link
Collaborator

@whitmanschorn whitmanschorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a couple of minor questions (like the skipped tests), but on the whole this is great! So fresh and so clean.

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.

None yet

2 participants