From 402a6feb7a6db7124c9802901232e973458e5d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Mon, 19 Feb 2018 10:12:28 +0100 Subject: [PATCH] chore(deps): upgrade flow to 0.66 (#5602) * chore(deps): upgrade flow to 0.66 * simplify assertionResults switch --- .flowconfig | 2 +- package.json | 2 +- .../src/legacy_code_todo_rewrite/jest_adapter_init.js | 3 +-- packages/jest-jasmine2/src/jasmine/jasmine_light.js | 2 +- packages/jest-jasmine2/src/queue_runner.js | 4 +--- types/Circus.js | 2 +- yarn.lock | 6 +++--- 7 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.flowconfig b/.flowconfig index 18facbe37888..30bdfc526a60 100644 --- a/.flowconfig +++ b/.flowconfig @@ -10,4 +10,4 @@ include_warnings=true emoji=true [version] -^0.64.0 +^0.66.0 diff --git a/package.json b/package.json index c7d93946d2b0..f506f6262e08 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "eslint-plugin-prettier": "^2.3.1", "eslint-plugin-react": "^7.1.0", "eslint-plugin-relay": "~0.0.19", - "flow-bin": "^0.64.0", + "flow-bin": "^0.66.0", "glob": "^7.1.1", "graceful-fs": "^4.1.11", "immutable": "^4.0.0-rc.7", diff --git a/packages/jest-circus/src/legacy_code_todo_rewrite/jest_adapter_init.js b/packages/jest-circus/src/legacy_code_todo_rewrite/jest_adapter_init.js index 54881d966991..78975994e767 100644 --- a/packages/jest-circus/src/legacy_code_todo_rewrite/jest_adapter_init.js +++ b/packages/jest-circus/src/legacy_code_todo_rewrite/jest_adapter_init.js @@ -96,9 +96,8 @@ export const runAndTransformResultsToJestFormat = async ({ case 'pass': status = 'passed'; break; - case 'skip': + default: status = 'pending'; - break; } const ancestorTitles = testResult.testPath.filter( diff --git a/packages/jest-jasmine2/src/jasmine/jasmine_light.js b/packages/jest-jasmine2/src/jasmine/jasmine_light.js index 911377194e92..b0113aa03913 100644 --- a/packages/jest-jasmine2/src/jasmine/jasmine_light.js +++ b/packages/jest-jasmine2/src/jasmine/jasmine_light.js @@ -42,7 +42,7 @@ import SpyRegistry from './spy_registry'; import Suite from './Suite'; import Timer from './Timer'; -export const create = function(createOptions: Object) { +exports.create = function(createOptions: Object) { const j$ = Object.assign({}, createOptions); j$.DEFAULT_TIMEOUT_INTERVAL = 5000; diff --git a/packages/jest-jasmine2/src/queue_runner.js b/packages/jest-jasmine2/src/queue_runner.js index 67637b5d31d2..062cfc0bdd51 100644 --- a/packages/jest-jasmine2/src/queue_runner.js +++ b/packages/jest-jasmine2/src/queue_runner.js @@ -79,16 +79,14 @@ export default function queueRunner(options: Options) { ); }; - const result: Promise = options.queueableFns.reduce( + const result = options.queueableFns.reduce( (promise, fn) => promise.then(() => mapper(fn)), Promise.resolve(), ); return { cancel: token.cancel.bind(token), - // $FlowFixMe catch: result.catch.bind(result), - // $FlowFixMe then: result.then.bind(result), }; } diff --git a/types/Circus.js b/types/Circus.js index 441c7ac277a3..d660885da60c 100644 --- a/types/Circus.js +++ b/types/Circus.js @@ -95,7 +95,7 @@ export type TestResult = {| duration: ?number, errors: Array, status: TestStatus, - testPath: Array, + testPath: Array, |}; export type TestResults = Array; diff --git a/yarn.lock b/yarn.lock index 5162dd421f07..97a2aa4ca845 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3302,9 +3302,9 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flow-bin@^0.64.0: - version "0.64.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.64.0.tgz#ddd3fb3b183ab1ab35a5d5dec9caf5ebbcded167" +flow-bin@^0.66.0: + version "0.66.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.66.0.tgz#a96dde7015dc3343fd552a7b4963c02be705ca26" flow-remove-types@^1.1.0: version "1.2.3"