Skip to content

Commit

Permalink
feat: upgrade to jest v24
Browse files Browse the repository at this point in the history
This upgrades the jest-preset-hops to use Jest 24.

BREAKING CHANGE: Jest v23 is no longer supported. Applications must
provide Jest v24 through their dependencies.

Closes: #815
  • Loading branch information
ZauberNerd authored and actions-user committed Nov 7, 2019
1 parent 3b1783c commit 63938e8
Show file tree
Hide file tree
Showing 20 changed files with 948 additions and 1,059 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
"eslint-plugin-prettier": "^3.0.0",
"eslint-plugin-react": "^7.9.1",
"husky": "^3.0.0",
"jest": "^23.4.2",
"jest": "^24.9.0",
"lerna": "^3.0.3",
"lint-staged": "^8.0.0",
"prettier": "^1.14.0"
Expand Down
13 changes: 6 additions & 7 deletions packages/jest-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,23 @@
"@babel/plugin-transform-flow-strip-types": "^7.4.0",
"@babel/preset-env": "^7.4.2",
"@babel/preset-react": "^7.0.0",
"@types/jest": "^23.3.12",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^23.4.2",
"@types/jest": "^24.0.18",
"babel-jest": "^24.9.0",
"babel-plugin-dynamic-import-node": "^2.0.0",
"hops": "^11.9.1",
"identity-obj-proxy": "^3.0.0",
"jest-config": "^23.0.0",
"ts-jest": "^23.1.2"
"jest-config": "^24.9.0",
"ts-jest": "^24.0.2"
},
"peerDependencies": {
"jest": "^23.0.0",
"jest": "^24.0.0",
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-helmet": "^5.2.0",
"react-router-dom": "^4.3.1 || ^5.0.0"
},
"devDependencies": {
"jest": "^23.4.2",
"jest": "^24.9.0",
"react": "^16.4.2",
"react-dom": "^16.4.2",
"react-helmet": "^5.2.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/spec/integration/create-hops-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
},
"jest": {
"testEnvironment": "../../helpers/env.js",
"setupTestFrameworkScriptFile": "../../jest.setup.js"
"setupFilesAfterEnv": [
"../../jest.setup.js"
]
}
}
8 changes: 6 additions & 2 deletions packages/spec/integration/development-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@
"browser": "browser.js",
"server": "server.js",
"hops": {
"mixins": ["./"]
"mixins": [
"./"
]
},
"jest": {
"testEnvironment": "../../helpers/env.js",
"setupTestFrameworkScriptFile": "../../jest.setup.js"
"setupFilesAfterEnv": [
"../../jest.setup.js"
]
},
"scripts": {
"start": "hops start",
Expand Down
4 changes: 3 additions & 1 deletion packages/spec/integration/graphql-mock-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
},
"jest": {
"testEnvironment": "../../helpers/env.js",
"setupTestFrameworkScriptFile": "../../jest.setup.js"
"setupFilesAfterEnv": [
"../../jest.setup.js"
]
},
"scripts": {
"start": "hops start",
Expand Down
8 changes: 6 additions & 2 deletions packages/spec/integration/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@
"node": ">= 8.10"
},
"hops": {
"mixins": ["./"],
"mixins": [
"./"
],
"graphqlUri": "https://www.graphqlhub.com/graphql"
},
"jest": {
"testEnvironment": "../../helpers/env.js",
"setupTestFrameworkScriptFile": "../../jest.setup.js"
"setupFilesAfterEnv": [
"../../jest.setup.js"
]
},
"scripts": {
"start": "hops start",
Expand Down
4 changes: 3 additions & 1 deletion packages/spec/integration/hot-module-reload/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
},
"jest": {
"testEnvironment": "../../helpers/env.js",
"setupTestFrameworkScriptFile": "../../jest.setup.js"
"setupFilesAfterEnv": [
"../../jest.setup.js"
]
},
"scripts": {
"start": "hops start",
Expand Down
4 changes: 3 additions & 1 deletion packages/spec/integration/jest-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"testPathIgnorePatterns": [
"__tests__/setup"
],
"setupTestFrameworkScriptFile": "../../jest.setup.js"
"setupFilesAfterEnv": [
"../../jest.setup.js"
]
},
"dependencies": {
"hops-preset-jest": "*"
Expand Down
4 changes: 3 additions & 1 deletion packages/spec/integration/lambda/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
},
"jest": {
"testEnvironment": "../../helpers/env.js",
"setupTestFrameworkScriptFile": "../../jest.setup.js"
"setupFilesAfterEnv": [
"../../jest.setup.js"
]
},
"hops": {
"basePath": "prod",
Expand Down
8 changes: 6 additions & 2 deletions packages/spec/integration/postcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
},
"jest": {
"testEnvironment": "../../helpers/env.js",
"setupTestFrameworkScriptFile": "../../jest.setup.js"
"setupFilesAfterEnv": [
"../../jest.setup.js"
]
},
"scripts": {
"start": "hops start",
Expand All @@ -18,6 +20,8 @@
"hops-postcss": "*"
},
"hops": {
"locations": ["/"]
"locations": [
"/"
]
}
}
8 changes: 6 additions & 2 deletions packages/spec/integration/pwa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@
},
"hops": {
"workerFile": "<rootDir>/service-worker.js",
"locations": ["/"]
"locations": [
"/"
]
},
"jest": {
"testEnvironment": "../../helpers/env.js",
"setupTestFrameworkScriptFile": "../../jest.setup.js"
"setupFilesAfterEnv": [
"../../jest.setup.js"
]
},
"scripts": {
"start": "hops start",
Expand Down
8 changes: 6 additions & 2 deletions packages/spec/integration/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@
"node": ">= 8.10"
},
"hops": {
"mixins": ["./"],
"mixins": [
"./"
],
"hoc": "hoc-test-value",
"context": "context-test-value"
},
"jest": {
"testEnvironment": "../../helpers/env.js",
"setupTestFrameworkScriptFile": "../../jest.setup.js"
"setupFilesAfterEnv": [
"../../jest.setup.js"
]
},
"scripts": {
"start": "hops start",
Expand Down
8 changes: 6 additions & 2 deletions packages/spec/integration/redux/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@
},
"jest": {
"testEnvironment": "../../helpers/env.js",
"setupTestFrameworkScriptFile": "../../jest.setup.js"
"setupFilesAfterEnv": [
"../../jest.setup.js"
]
},
"scripts": {
"start": "hops start",
"build": "hops build"
},
"hops": {
"port": "8901",
"mixins": ["./"]
"mixins": [
"./"
]
},
"dependencies": {
"hops": "*",
Expand Down
4 changes: 3 additions & 1 deletion packages/spec/integration/styled-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
},
"jest": {
"testEnvironment": "../../helpers/env.js",
"setupTestFrameworkScriptFile": "../../jest.setup.js"
"setupFilesAfterEnv": [
"../../jest.setup.js"
]
},
"scripts": {
"start": "hops start",
Expand Down
4 changes: 3 additions & 1 deletion packages/spec/integration/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
},
"jest": {
"testEnvironment": "../../helpers/env.js",
"setupTestFrameworkScriptFile": "../../jest.setup.js"
"setupFilesAfterEnv": [
"../../jest.setup.js"
]
},
"scripts": {
"start": "hops start",
Expand Down
2 changes: 1 addition & 1 deletion packages/spec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"create-hops-app": "^12.0.0-alpha.0",
"cross-fetch": "^3.0.0",
"fs-extra": "^8.0.0",
"jest-environment-node": "^23.4.0",
"jest-environment-node": "^24.9.0",
"mktemp": "^1.0.0",
"puppeteer": "^1.11.0",
"resolve-from": "^5.0.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/template-graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
"react-router-dom": "^5.0.0"
},
"devDependencies": {
"babel-core": "^7.0.0-bridge.0",
"jest": "^23.4.2",
"jest": "^24.9.0",
"jest-preset-hops": "^11.9.1",
"react-test-renderer": "^16.4.2"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/template-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
"react-router-dom": "^5.0.0"
},
"devDependencies": {
"babel-core": "^7.0.0-bridge.0",
"jest": "^23.4.2",
"jest": "^24.9.0",
"jest-preset-hops": "^11.9.1",
"react-test-renderer": "^16.4.2"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/template-redux/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"babel-core": "^7.0.0-bridge.0",
"jest": "^23.4.2",
"jest": "^24.9.0",
"jest-preset-hops": "^11.9.1",
"react-test-renderer": "^16.4.2"
},
Expand Down
Loading

0 comments on commit 63938e8

Please sign in to comment.