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:
Martin Konicek 2016-03-02 05:45:50 -08:00 committed by Facebook Github Bot 4
parent 170f4526f5
commit 4654b34c97
1 changed files with 9 additions and 1 deletions

View File

@ -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 = {