From e2949e4ba26a3daa7de639e9cf8de736db05456e Mon Sep 17 00:00:00 2001 From: cpojer Date: Tue, 26 Apr 2016 03:22:53 -0700 Subject: [PATCH] Update to Jest 11.0.2. Summary: I ran a codemod and broke draft-js. Updated to the latest version. Had to fix one test that in open source wasn't behaving. I think this fixes it properly, must have been a Jest bug before :) Closes https://github.com/facebook/draft-js/pull/341 Differential Revision: D3223859 fb-gh-sync-id: 03ea20ebcb14caa40103ffa06c3561c0faaa645d fbshipit-source-id: 03ea20ebcb14caa40103ffa06c3561c0faaa645d --- package.json | 6 +++--- .../contents/__tests__/DraftEditorTextNode-test.js | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 06965d6300..304b68a633 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "gulp-header": "^1.7.1", "gulp-uglify": "^1.2.0", "gulp-util": "^3.0.6", - "jest-cli": "^0.9.0-fb1", + "jest-cli": "^11.0.2", "object-assign": "^4.0.1", "react": "^15.0.0-rc.1", "react-dom": "^15.0.0-rc.1", @@ -84,10 +84,10 @@ "testPathDirs": [ "/src/" ], - "testRunner": "node_modules/jest-cli/src/testRunners/jasmine/jasmine2.js", "unmockedModulePathPatterns": [ "/node_modules/fbjs/node_modules/", - "/node_modules/fbjs/lib/(?!(UserAgent.js$|UserAgentData.js$))", + "/node_modules/fbjs/lib/UserAgent.js", + "/node_modules/fbjs/lib/UserAgentData.js", "/node_modules/fbjs-scripts/", "/node_modules/immutable/", "/node_modules/react/", diff --git a/src/component/contents/__tests__/DraftEditorTextNode-test.js b/src/component/contents/__tests__/DraftEditorTextNode-test.js index a9d33f568b..5217e78f88 100644 --- a/src/component/contents/__tests__/DraftEditorTextNode-test.js +++ b/src/component/contents/__tests__/DraftEditorTextNode-test.js @@ -11,7 +11,8 @@ 'use strict'; -jest.unmock('DraftEditorTextNode.react'); +jest.unmock('DraftEditorTextNode.react') + .mock('UserAgent'); var BLOCK_DELIMITER_CHAR = '\n'; var TEST_A = 'Hello';