[RN] quick fix to unblock OSS tests
Summary: For some reason jest on github isn't checking invariants.
This commit is contained in:
Родитель
a886e4c66b
Коммит
c66b1c64b5
|
@ -11,7 +11,14 @@
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'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';
|
type ExtrapolateType = 'extend' | 'identity' | 'clamp';
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче