[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
Родитель a886e4c66b
Коммит c66b1c64b5
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

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