Revert Remove invariant hack for jest
Summary: This reverts D2988899 as it consistently broke the Invariant test on Travis: https://travis-ci.org/facebook/react-native Reviewed By: bestander Differential Revision: D2999915 fb-gh-sync-id: 781ab5f6fc8e3b97bc4d215af855823f4b5014dd shipit-source-id: 781ab5f6fc8e3b97bc4d215af855823f4b5014dd
This commit is contained in:
parent
170f4526f5
commit
4654b34c97
|
@ -12,9 +12,17 @@
|
|||
/* 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 = {
|
||||
|
|
Loading…
Reference in New Issue