1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Fix with-jest-typescript example to keep babel-jest in sync with jest (#5941)

This fixes the `with-jest-typescript` example to keep jest in sync with babel-jest (also updated to the latest of both). Having them resolve to different versions was resulting in weird errors.

When attempting to update the `transform` property in `jest.setup.js` to add babel-jest support to *.js/jsx files, it would throw:

> Plugin 0 specified in "node_modules/next/babel.js" provided an invalid property of "default" (While processing preset: "node_modules/next/babel.js")

Indirectly, this will fix https://github.com/zeit/next.js/issues/5917, once the author updates `jest.setup.js` to have:
```js
  transform: {
    '^.+\\.(js|tsx)?$': 'babel-jest',
  },
```
This commit is contained in:
Zack Tanner 2018-12-23 12:55:35 -08:00 committed by Tim Neutkens
parent b5fa6c5969
commit ec33b83843

View file

@ -19,10 +19,10 @@
"@types/react-dom": "^16.0.4", "@types/react-dom": "^16.0.4",
"@zeit/next-typescript": "1.1.0", "@zeit/next-typescript": "1.1.0",
"babel-core": "^7.0.0-bridge.0", "babel-core": "^7.0.0-bridge.0",
"babel-jest": "23.0.1", "babel-jest": "^23.6.0",
"enzyme": "^3.3.0", "enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1", "enzyme-adapter-react-16": "^1.1.1",
"jest": "^23.1.0", "jest": "^23.6.0",
"react-addons-test-utils": "^15.6.2", "react-addons-test-utils": "^15.6.2",
"react-test-renderer": "^16.2.0", "react-test-renderer": "^16.2.0",
"typescript": "^2.7.2" "typescript": "^2.7.2"