[RN] quick fix to unblock OSS tests

Summary:
For some reason jest on github isn't checking invariants.
This commit is contained in:
Spencer Ahrens
2015-07-08 07:31:05 -07:00
parent a886e4c66b
commit c66b1c64b5

View File

@@ -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';