From 85801ef87491e25323d3d8f9cb387f96776f3ff8 Mon Sep 17 00:00:00 2001 From: Spencer Ahrens Date: Tue, 1 Mar 2016 13:42:12 -0800 Subject: [PATCH] Remove invariant hack for jest Reviewed By: vjeux, cpojer Differential Revision: D2988899 fb-gh-sync-id: e1b2a32a3f665b8f8a246e73e8dd620ff8506ea7 shipit-source-id: e1b2a32a3f665b8f8a246e73e8dd620ff8506ea7 --- Libraries/Animated/src/Interpolation.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Libraries/Animated/src/Interpolation.js b/Libraries/Animated/src/Interpolation.js index b97d063b9..c8daa2406 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('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 = {