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

Deprication Warnings from spec files? with react 15.5 #3270

Closed
th3fallen opened this issue Apr 8, 2017 · 5 comments
Closed

Deprication Warnings from spec files? with react 15.5 #3270

th3fallen opened this issue Apr 8, 2017 · 5 comments

Comments

@th3fallen
Copy link

th3fallen commented Apr 8, 2017

Do you want to request a feature or report a bug? Bug

What is the current behavior?
receive console.error node_modules/fbjs/lib/warning.js:36 Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead. from running tests dispite them being updated

If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can yarn install and yarn test.

https://gist.github.com/th3fallen/13b4f263bbeb226058a507f2658c3c66
i can reproduce in your repl link becaue it's running jest 18 and a lower version of react

When running jest tests after updating to react 15.5.0 and migrating to the new external proptypes package all specs give the deprication warning

What is the expected behavior?
warnings should not be triggered if components are using new external proptypes package

Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.

Jest v19.0.2

"jest": {
    "modulePaths": [
      "app"
    ],
    "coverageThreshold": {
      "global": {
        "statements": 85,
        "branches": 70,
        "functions": 80,
        "lines": 85
      }
    },
    "coverageDirectory": "<rootDir>/reports/coverage",
    "collectCoverageFrom": [
      "app/**/*.js",
      "!app/tests/**",
      "!app/shared/vendor/**",
      "!app/main.js"
    ],
    "notify": true,
    "coverageReporters": [
      "lcov",
      "text-summary"
    ],
    "setupFiles": [
      "<rootDir>/scripts/testSetup.js"
    ],
    "snapshotSerializers": [
      "enzyme-to-json/serializer"
    ],
    "moduleNameMapper": {
      "^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
      "^.+\\.(css|scss)$": "<rootDir>/__mocks__/styleMock.js"
    }
  },

package.json

{ "name": "wheniwork-js", "version": "0.0.1", "description": "The next generation of When I Work UI", "main": "index.js", "scripts": { "start": "export NODE_ENV=dev && webpack-dashboard -- node -r babel-register server.js", "clean": "rm -rf ./dist/*", "build": "npm run clean && NODE_ENV=${NODE_ENV:=production} node -r babel-register ./node_modules/.bin/webpack --progress --colors", "build:production": "npm run build -- -p", "test": "jest", "test:coverage": "jest --coverage", "test:watch": "jest --watch", "lint": "eslint app", "lint:fix": "eslint app --fix", "deploy": "node -r babel-register scripts/deploy.js", "deploy:staging": "export NODE_ENV=staging PUBLIC_PATH=${PUBLIC_PATH:=\"/$(git symbolic-ref HEAD 2> /dev/null | sed -e 's/^refs\\/heads\\///')/\"} && npm run build && npm run deploy", "deploy:production": "export NODE_ENV=production DEPLOY_PATH=${DEPLOY_PATH:=\"/$(git symbolic-ref HEAD 2> /dev/null | sed -e 's/^refs\\/heads\\///')/\"} && npm run build:production && npm run deploy", "publish": "node -r babel-register scripts/publish.js" }, "author": "Daniel Olfelt", "license": "MIT", "jest": { "modulePaths": [ "app" ], "coverageThreshold": { "global": { "statements": 85, "branches": 70, "functions": 80, "lines": 85 } }, "coverageDirectory": "/reports/coverage", "collectCoverageFrom": [ "app/**/*.js", "!app/tests/**", "!app/shared/vendor/**", "!app/main.js" ], "notify": true, "coverageReporters": [ "lcov", "text-summary" ], "setupFiles": [ "/scripts/testSetup.js" ], "snapshotSerializers": [ "enzyme-to-json/serializer" ], "moduleNameMapper": { "^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/__mocks__/fileMock.js", "^.+\\.(css|scss)$": "/__mocks__/styleMock.js" } }, "devDependencies": { "autoprefixer": "^6.6.1", "babel-core": "^6.21.0", "babel-eslint": "^7.1.1", "babel-jest": "^19.0.0", "babel-loader": "^6.2.5", "babel-plugin-istanbul": "^3.0.0", "babel-plugin-react-transform": "^2.0.2", "babel-polyfill": "^6.13.0", "babel-preset-es2015": "^6.16.0", "babel-preset-react": "^6.16.0", "babel-preset-react-hmre": "^1.1.1", "babel-preset-stage-0": "^6.5.0", "babel-register": "^6.11.6", "bootstrap": "^4.0.0-alpha", "css-loader": "^0.26.0", "enzyme": "^2.7.0", "enzyme-to-json": "^1.1.4", "eslint": "^3.19.0", "eslint-plugin-react": "^6.1.2", "event-stream": "^3.3.2", "extract-text-webpack-plugin": "^2.0.0-beta", "faker": "^3.1.0", "file-loader": "^0.10.0", "github-api": "^3.0.0", "gitlab-yaac": "^0.0.4", "html-webpack-plugin": "^2.25.0", "isparta": "^4.0.0", "jest": "^19.0.2", "json-loader": "^0.5.4", "knox": "^0.9.2", "knox-mpu": "^0.1.6", "lolex": "^1.5.1", "node-sass": "^4.1.1", "postcss-loader": "^1.1.1", "react-addons-test-utils": "^15.4.1", "react-proxy": "^1.1.8", "redux-mock-store": "^1.2.1", "rename": "^1.0.4", "sass-loader": "^5.0.0", "style-loader": "^0.13.1", "url-loader": "^0.5.7", "webpack": "^2.1.0-beta", "webpack-dashboard": "^0.3.0", "webpack-dev-server": "^2.1.0-beta", "webpack-merge": "^2.3.1", "yml-loader": "^1.1.0" }, "dependencies": { "animate-components": "^0.3.6", "classnames": "^2.2.5", "credit.js": "^0.0.6", "formsy-react": "^0.19.0", "google-libphonenumber": "^2.0.5", "hint.css": "2.4.1", "immutable": "^3.8.1", "js-cookie": "^2.1.2", "js-yaml": "^3.7.0", "jwt-decode": "^2.1.0", "lodash": "^4.17.4", "moment": "^2.17.0", "prop-types": "^15.5.4", "react": "^15.5.3", "react-addons-css-transition-group": "^15.4.1", "react-addons-shallow-compare": "^15.4.1", "react-addons-transition-group": "^15.4.1", "react-color": "^2.8.0", "react-dom": "^15.4.1", "react-dropzone": "^3.6.0", "react-image-lightbox": "^3.3.0", "react-input-autosize": "^1.1.0", "react-keypress": "^0.1.5", "react-redux": "^5.0.3", "react-router": "^3.0.0", "react-router-redux": "^4.0.5", "react-select": "^1.0.0-rc.2", "react-sortable-hoc": "^0.4.0", "react-toggle": "^2.2.0", "reactstrap": "^4.3.0", "redux": "^3.5.2", "redux-segment": "^1.6.0", "redux-thunk": "^2.1.0", "reselect": "^2.5.1", "rollbar-browser": "^1.9.3", "validator": "^6.2.0", "whatwg-fetch": "^2.0.1" } }

Versions

{ yarn: '0.21.3',
  'wheniwork-js': '0.0.1',
  http_parser: '2.7.0',
  node: '6.10.0',
  v8: '5.1.281.93',
  uv: '1.9.1',
  zlib: '1.2.8',
  ares: '1.10.1-DEV',
  icu: '58.2',
  modules: '48',
  openssl: '1.0.2k' }

Running on OSX 10.12.5 beta 16F43c

@th3fallen th3fallen changed the title Deprication Warnings from spec files? Deprication Warnings from spec files? with react 15.5 Apr 8, 2017
@thymikee
Copy link
Collaborator

thymikee commented Apr 8, 2017

This is probably coming from Enzyme (related PR enzymejs/enzyme#876) or other library.

@thymikee thymikee closed this as completed Apr 8, 2017
@th3fallen
Copy link
Author

That was my first thought but this test isn't using enzyme?

@thymikee
Copy link
Collaborator

thymikee commented Apr 8, 2017

This test also doesn't feature any React code, and yet it logs the error? Something somewhere has to reference it, and it's certainly not a fault of Jest.

@th3fallen
Copy link
Author

Touche... Thanks for the input :)

@github-actions
Copy link

This issue 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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants