From d3f2081d9091179ed0ac6511c6c660947b950e45 Mon Sep 17 00:00:00 2001 From: David Aurelio Date: Wed, 2 Mar 2016 07:06:50 -0800 Subject: [PATCH] Fix unit tests in open source environment Summary:**Test plan** run `npm test`, see all tests pass Closes https://github.com/facebook/react-native/pull/6243 Differential Revision: D2999993 Pulled By: davidaurelio fb-gh-sync-id: 54f2d5f9d28a31d132783694133df78370660421 shipit-source-id: 54f2d5f9d28a31d132783694133df78370660421 --- Libraries/Animated/src/Interpolation.js | 10 +--------- Libraries/vendor/core/Map.js | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Libraries/Animated/src/Interpolation.js b/Libraries/Animated/src/Interpolation.js index b97d063b94..50f77ed710 100644 --- a/Libraries/Animated/src/Interpolation.js +++ b/Libraries/Animated/src/Interpolation.js @@ -12,17 +12,9 @@ /* eslint no-bitwise: 0 */ 'use strict'; +var invariant = require('fbjs/lib/invariant'); var normalizeColor = require('normalizeColor'); -// TODO(#7644673): fix this hack once github jest actually checks invariants -var invariant = function(condition, message) { - if (!condition) { - var error = new Error(message); - (error: any).framesToPop = 1; // $FlowIssue - throw error; - } -}; - type ExtrapolateType = 'extend' | 'identity' | 'clamp'; export type InterpolationConfigType = { diff --git a/Libraries/vendor/core/Map.js b/Libraries/vendor/core/Map.js index 114add77b3..b3153b39df 100644 --- a/Libraries/vendor/core/Map.js +++ b/Libraries/vendor/core/Map.js @@ -19,7 +19,7 @@ */ var guid = require('guid'); -var isNode = require('isNode'); +var isNode = require('fbjs/lib/isNode'); var toIterator = require('toIterator'); var _shouldPolyfillES6Collection = require('_shouldPolyfillES6Collection');