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

Fix React PropTypes warning in tests for Immutable plugin #4412

Merged
merged 1 commit into from
Sep 1, 2017

Conversation

pedrottimark
Copy link
Contributor

Summary

After changes for upgrade to Flow 0.53.1, immutable.test.js had 2 occurrences of:

console.warn node_modules/react/lib/lowPriorityWarning.js:40
Warning: Accessing PropTypes via the main React package is deprecated, and will be removed in React v16.0. Use the latest available v15.* prop-types package from npm instead. For info on usage, compatibility, migration and more, see https://fb.me/prop-types-docs

After reading https://flow.org/en/docs/react/types/

If you want to access them [utility types] then you should import React as a namespace import * as React from 'react'

if you import React with: import React from 'react' you will be able to access React.createElement()

These tests depend only on React.createElement() not on any utility types.

Test plan

Check console in CI

@cpojer cpojer merged commit 0e76e68 into jestjs:master Sep 1, 2017
@pedrottimark pedrottimark deleted the react-proptypes-warning branch September 1, 2017 20:03
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants