From 4731eb940dccb91c76b8d8155f9346dca1f2814b Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Wed, 22 Aug 2018 14:52:42 +0200 Subject: [PATCH 1/2] test(jest): add --detectOpenHandles switch --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 774a992a..2c578b89 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "start-main-dev": "cross-env HOT=1 NODE_ENV=development electron -r babel-register ./app/main.dev", "start-renderer-dev": "node --trace-warnings -r babel-register ./node_modules/webpack-serve/lib/cli.js --config webpack.config.renderer.dev.js", "test": "npm run lint && npm run lint-styles && npm run flow && npm run build && npm run test-unit && npm run test-e2e", - "test-base": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=true ELECTRON_DISABLE_SECURITY_WARNINGS=true node --trace-warnings ./node_modules/jest/bin/jest", + "test-base": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=true ELECTRON_DISABLE_SECURITY_WARNINGS=true node --trace-warnings ./node_modules/jest/bin/jest --detectOpenHandles", "test-unit": "npm run test-base -- ./test/unit", "test-e2e": "npm run test-base -- ./test/e2e", "test-ci": "npm run test-e2e && npm run test-unit" From ac3ee5f5f096b26a5d87c96266ebdeb1fdf3efc9 Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Wed, 22 Aug 2018 14:55:25 +0200 Subject: [PATCH 2/2] chore(deps): update jest to v23.5.0 This resolves an issue with jest that was preventing tests from completing on windows environments. See https://github.com/facebook/jest/issues/6639 --- package.json | 2 +- yarn.lock | 184 ++++++++++++++++++++++++++------------------------- 2 files changed, 94 insertions(+), 92 deletions(-) diff --git a/package.json b/package.json index 2c578b89..80f3a5f2 100644 --- a/package.json +++ b/package.json @@ -252,7 +252,7 @@ "http-proxy-middleware": "^0.18.0", "husky": "^1.0.0-rc.9", "identity-obj-proxy": "^3.0.0", - "jest": "^23.4.2", + "jest": "^23.5.0", "jsdom": "^11.12.0", "koa-connect": "^2.0.1", "lint-staged": "^7.2.0", diff --git a/yarn.lock b/yarn.lock index d7b51c68..ea73a0a3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4735,14 +4735,14 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" -expect@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-23.4.0.tgz#6da4ecc99c1471253e7288338983ad1ebadb60c3" +expect@^23.5.0: + version "23.5.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-23.5.0.tgz#18999a0eef8f8acf99023fde766d9c323c2562ed" dependencies: ansi-styles "^3.2.0" - jest-diff "^23.2.0" + jest-diff "^23.5.0" jest-get-type "^22.1.0" - jest-matcher-utils "^23.2.0" + jest-matcher-utils "^23.5.0" jest-message-util "^23.4.0" jest-regex-util "^23.3.0" @@ -6679,9 +6679,9 @@ jest-changed-files@^23.4.2: dependencies: throat "^4.0.0" -jest-cli@^23.4.2: - version "23.4.2" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.4.2.tgz#49d56bcfe6cf01871bfcc4a0494e08edaf2b61d0" +jest-cli@^23.5.0: + version "23.5.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.5.0.tgz#d316b8e34a38a610a1efc4f0403d8ef8a55e4492" dependencies: ansi-escapes "^3.0.0" chalk "^2.0.1" @@ -6695,18 +6695,18 @@ jest-cli@^23.4.2: istanbul-lib-instrument "^1.10.1" istanbul-lib-source-maps "^1.2.4" jest-changed-files "^23.4.2" - jest-config "^23.4.2" + jest-config "^23.5.0" jest-environment-jsdom "^23.4.0" jest-get-type "^22.1.0" - jest-haste-map "^23.4.1" + jest-haste-map "^23.5.0" jest-message-util "^23.4.0" jest-regex-util "^23.3.0" - jest-resolve-dependencies "^23.4.2" - jest-runner "^23.4.2" - jest-runtime "^23.4.2" - jest-snapshot "^23.4.2" + jest-resolve-dependencies "^23.5.0" + jest-runner "^23.5.0" + jest-runtime "^23.5.0" + jest-snapshot "^23.5.0" jest-util "^23.4.0" - jest-validate "^23.4.0" + jest-validate "^23.5.0" jest-watcher "^23.4.0" jest-worker "^23.2.0" micromatch "^2.3.11" @@ -6720,9 +6720,9 @@ jest-cli@^23.4.2: which "^1.2.12" yargs "^11.0.0" -jest-config@^23.4.2: - version "23.4.2" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.4.2.tgz#62a105e14b8266458f2bf4d32403b2c44418fa77" +jest-config@^23.5.0: + version "23.5.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.5.0.tgz#3770fba03f7507ee15f3b8867c742e48f31a9773" dependencies: babel-core "^6.0.0" babel-jest "^23.4.2" @@ -6731,21 +6731,22 @@ jest-config@^23.4.2: jest-environment-jsdom "^23.4.0" jest-environment-node "^23.4.0" jest-get-type "^22.1.0" - jest-jasmine2 "^23.4.2" + jest-jasmine2 "^23.5.0" jest-regex-util "^23.3.0" - jest-resolve "^23.4.1" + jest-resolve "^23.5.0" jest-util "^23.4.0" - jest-validate "^23.4.0" - pretty-format "^23.2.0" + jest-validate "^23.5.0" + micromatch "^2.3.11" + pretty-format "^23.5.0" -jest-diff@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.2.0.tgz#9f2cf4b51e12c791550200abc16b47130af1062a" +jest-diff@^23.5.0: + version "23.5.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.5.0.tgz#250651a433dd0050290a07642946cc9baaf06fba" dependencies: chalk "^2.0.1" diff "^3.2.0" jest-get-type "^22.1.0" - pretty-format "^23.2.0" + pretty-format "^23.5.0" jest-docblock@^21.0.0: version "21.2.0" @@ -6757,12 +6758,12 @@ jest-docblock@^23.2.0: dependencies: detect-newline "^2.1.0" -jest-each@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.4.0.tgz#2fa9edd89daa1a4edc9ff9bf6062a36b71345143" +jest-each@^23.5.0: + version "23.5.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.5.0.tgz#77f7e2afe6132a80954b920006e78239862b10ba" dependencies: chalk "^2.0.1" - pretty-format "^23.2.0" + pretty-format "^23.5.0" jest-environment-jsdom@^23.4.0: version "23.4.0" @@ -6783,48 +6784,49 @@ jest-get-type@^22.1.0: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4" -jest-haste-map@^23.4.1: - version "23.4.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.4.1.tgz#43a174ba7ac079ae1dd74eaf5a5fe78989474dd2" +jest-haste-map@^23.5.0: + version "23.5.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.5.0.tgz#d4ca618188bd38caa6cb20349ce6610e194a8065" dependencies: fb-watchman "^2.0.0" graceful-fs "^4.1.11" + invariant "^2.2.4" jest-docblock "^23.2.0" jest-serializer "^23.0.1" jest-worker "^23.2.0" micromatch "^2.3.11" sane "^2.0.0" -jest-jasmine2@^23.4.2: - version "23.4.2" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.4.2.tgz#2fbf52f93e43ed4c5e7326a90bb1d785be4321ac" +jest-jasmine2@^23.5.0: + version "23.5.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.5.0.tgz#05fe7f1788e650eeb5a03929e6461ea2e9f3db53" dependencies: babel-traverse "^6.0.0" chalk "^2.0.1" co "^4.6.0" - expect "^23.4.0" + expect "^23.5.0" is-generator-fn "^1.0.0" - jest-diff "^23.2.0" - jest-each "^23.4.0" - jest-matcher-utils "^23.2.0" + jest-diff "^23.5.0" + jest-each "^23.5.0" + jest-matcher-utils "^23.5.0" jest-message-util "^23.4.0" - jest-snapshot "^23.4.2" + jest-snapshot "^23.5.0" jest-util "^23.4.0" - pretty-format "^23.2.0" + pretty-format "^23.5.0" -jest-leak-detector@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.2.0.tgz#c289d961dc638f14357d4ef96e0431ecc1aa377d" +jest-leak-detector@^23.5.0: + version "23.5.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.5.0.tgz#14ac2a785bd625160a2ea968fd5d98b7dcea3e64" dependencies: - pretty-format "^23.2.0" + pretty-format "^23.5.0" -jest-matcher-utils@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.2.0.tgz#4d4981f23213e939e3cedf23dc34c747b5ae1913" +jest-matcher-utils@^23.5.0: + version "23.5.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.5.0.tgz#0e2ea67744cab78c9ab15011c4d888bdd3e49e2a" dependencies: chalk "^2.0.1" jest-get-type "^22.1.0" - pretty-format "^23.2.0" + pretty-format "^23.5.0" jest-message-util@^23.4.0: version "23.4.0" @@ -6844,42 +6846,42 @@ jest-regex-util@^23.3.0: version "23.3.0" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.3.0.tgz#5f86729547c2785c4002ceaa8f849fe8ca471bc5" -jest-resolve-dependencies@^23.4.2: - version "23.4.2" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.4.2.tgz#0675ba876a5b819deffc449ad72e9985c2592048" +jest-resolve-dependencies@^23.5.0: + version "23.5.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.5.0.tgz#10c4d135beb9d2256de1fedc7094916c3ad74af7" dependencies: jest-regex-util "^23.3.0" - jest-snapshot "^23.4.2" + jest-snapshot "^23.5.0" -jest-resolve@^23.4.1: - version "23.4.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.4.1.tgz#7f3c17104732a2c0c940a01256025ed745814982" +jest-resolve@^23.5.0: + version "23.5.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.5.0.tgz#3b8e7f67e84598f0caf63d1530bd8534a189d0e6" dependencies: browser-resolve "^1.11.3" chalk "^2.0.1" realpath-native "^1.0.0" -jest-runner@^23.4.2: - version "23.4.2" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.4.2.tgz#579a88524ac52c846075b0129a21c7b483e75a7e" +jest-runner@^23.5.0: + version "23.5.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.5.0.tgz#570f7a044da91648b5bb9b6baacdd511076c71d7" dependencies: exit "^0.1.2" graceful-fs "^4.1.11" - jest-config "^23.4.2" + jest-config "^23.5.0" jest-docblock "^23.2.0" - jest-haste-map "^23.4.1" - jest-jasmine2 "^23.4.2" - jest-leak-detector "^23.2.0" + jest-haste-map "^23.5.0" + jest-jasmine2 "^23.5.0" + jest-leak-detector "^23.5.0" jest-message-util "^23.4.0" - jest-runtime "^23.4.2" + jest-runtime "^23.5.0" jest-util "^23.4.0" jest-worker "^23.2.0" source-map-support "^0.5.6" throat "^4.0.0" -jest-runtime@^23.4.2: - version "23.4.2" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.4.2.tgz#00c3bb8385253d401a394a27d1112d3615e5a65c" +jest-runtime@^23.5.0: + version "23.5.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.5.0.tgz#eb503525a196dc32f2f9974e3482d26bdf7b63ce" dependencies: babel-core "^6.0.0" babel-plugin-istanbul "^4.1.6" @@ -6888,14 +6890,14 @@ jest-runtime@^23.4.2: exit "^0.1.2" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.1.11" - jest-config "^23.4.2" - jest-haste-map "^23.4.1" + jest-config "^23.5.0" + jest-haste-map "^23.5.0" jest-message-util "^23.4.0" jest-regex-util "^23.3.0" - jest-resolve "^23.4.1" - jest-snapshot "^23.4.2" + jest-resolve "^23.5.0" + jest-snapshot "^23.5.0" jest-util "^23.4.0" - jest-validate "^23.4.0" + jest-validate "^23.5.0" micromatch "^2.3.11" realpath-native "^1.0.0" slash "^1.0.0" @@ -6907,19 +6909,19 @@ jest-serializer@^23.0.1: version "23.0.1" resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-23.0.1.tgz#a3776aeb311e90fe83fab9e533e85102bd164165" -jest-snapshot@^23.4.2: - version "23.4.2" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.4.2.tgz#8fa6130feb5a527dac73e5fa80d86f29f7c42ab6" +jest-snapshot@^23.5.0: + version "23.5.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.5.0.tgz#cc368ebd8513e1175e2a7277f37a801b7358ae79" dependencies: babel-types "^6.0.0" chalk "^2.0.1" - jest-diff "^23.2.0" - jest-matcher-utils "^23.2.0" + jest-diff "^23.5.0" + jest-matcher-utils "^23.5.0" jest-message-util "^23.4.0" - jest-resolve "^23.4.1" + jest-resolve "^23.5.0" mkdirp "^0.5.1" natural-compare "^1.4.0" - pretty-format "^23.2.0" + pretty-format "^23.5.0" semver "^5.5.0" jest-util@^23.4.0: @@ -6944,14 +6946,14 @@ jest-validate@^23.0.0: leven "^2.1.0" pretty-format "^23.0.1" -jest-validate@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.4.0.tgz#d96eede01ef03ac909c009e9c8e455197d48c201" +jest-validate@^23.5.0: + version "23.5.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.5.0.tgz#f5df8f761cf43155e1b2e21d6e9de8a2852d0231" dependencies: chalk "^2.0.1" jest-get-type "^22.1.0" leven "^2.1.0" - pretty-format "^23.2.0" + pretty-format "^23.5.0" jest-watcher@^23.4.0: version "23.4.0" @@ -6967,12 +6969,12 @@ jest-worker@^23.2.0: dependencies: merge-stream "^1.0.1" -jest@^23.4.2: - version "23.4.2" - resolved "https://registry.yarnpkg.com/jest/-/jest-23.4.2.tgz#1fae3ed832192143070ae85156b25cea891a1260" +jest@^23.5.0: + version "23.5.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-23.5.0.tgz#80de353d156ea5ea4a7332f7962ac79135fbc62e" dependencies: import-local "^1.0.0" - jest-cli "^23.4.2" + jest-cli "^23.5.0" js-base64@^2.1.8, js-base64@^2.1.9: version "2.1.9" @@ -9460,9 +9462,9 @@ pretty-format@^23.0.1: ansi-regex "^3.0.0" ansi-styles "^3.2.0" -pretty-format@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.2.0.tgz#3b0aaa63c018a53583373c1cb3a5d96cc5e83017" +pretty-format@^23.5.0: + version "23.5.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.5.0.tgz#0f9601ad9da70fe690a269cd3efca732c210687c" dependencies: ansi-regex "^3.0.0" ansi-styles "^3.2.0"