From c66b1c64b549fdefa18a12348aeca19d05bbae95 Mon Sep 17 00:00:00 2001 From: Spencer Ahrens Date: Wed, 8 Jul 2015 07:31:05 -0700 Subject: [PATCH] [RN] quick fix to unblock OSS tests Summary: For some reason jest on github isn't checking invariants. --- Libraries/Animation/Animated/Interpolation.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Libraries/Animation/Animated/Interpolation.js b/Libraries/Animation/Animated/Interpolation.js index bed22ec85..b4939846f 100644 --- a/Libraries/Animation/Animated/Interpolation.js +++ b/Libraries/Animation/Animated/Interpolation.js @@ -11,7 +11,14 @@ */ 'use strict'; -var invariant = require('invariant'); +// 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';